I have downloaded the ADT bundle from Google to develop Android applications. Also I have installed Java with JDK 8u5 for MacOSX 64 bits. When I try to open Eclipse by clicking over Eclipse icon, it shows a dialog saying it's necessary to install a Java 6 version.
Is it possible to execute Eclipse (and other java applications) with Java 8? If yes, How can I do it?
(I have seen solutions for JDK 7 but not for JDK 8)
Many thanks and kind regards
The current ADT is built on Eclipse Keplar base. Eclipse (Keplar), currently, does have built in support for using Java 8 .. but it can be added (here are directions from Eclipse). There are builds of the next Eclipse (Luna) release stream that should have Java 8 "builtin" this week. However, I have not seen any plans to build ADT on top of a pre-release Eclipse (Luna) version. The Android team has typically waited beyond release.
Related
I recently bought a new MacBook. I installed the Android SDK and Studio and then I imported my project. AS suggested to use the bundled Open JDK for my project. I accepted and I am able to build and run my project via AS.
The problem is, my command line doesn't work :(
==> ./gradlew clean
No Java runtime present, requesting install.
After running the above code the following alert displays. This web page will be open when I click on the More Info button.
After I searched I realized that I have to have JDK installed on my laptop. I remember -from thousand years ago- that I have to have JDK 8 on my laptop. I also heard that android projects work with JDK 11.
It looks like the latest JDK is 15. So, what should I do? What is the latest JDK that can be used for Android app development?
Anything Java 8 or above is fine.
Find path to JDK in File > Project Structure, Tab SDK Location > JDK Location.
In MacOS, installed Virtual Machines are normally placed in /Library/Java/JavaVirtualMachines/*
In Netbeans 8.2, it says to use Java JDK 8.1 or higher. When I use the latest version of JDK, Netbeans will load up but I can’t open or make new projects. When I get 8.1 I can’t use certain features of languages, like timers in Java.
What JDK should I use to have both Netbeans functioning and have all features of Java usable?
This document describes how to install NetBeans IDE 8.2 on your system. Please see the NetBeans IDE 8.2 Release Notes for information about supported operating systems and hardware configurations for the IDE. To learn about the new features included in this release of the IDE see the NetBeans IDE 8.2 Release Information page.
And use 8u191 or 8u192 for Netbeans 8.2
Somewhat specific to Ubuntu, or at least Linux: install Java with SDKman which is somewhat like RVM but for Java. Quite simple to install, it will then manage your JDK versions.
Additionally, umake, or ubuntu-make, will install your IDE or other developer tools. This utility is best installed through the snap package manager to get the latest version.
From umake it's a simple command to then install developer tools such as NetBeans. Currently this installs NB 8.2 which will not run on any JDK nine or higher.
Use SDKman to manage your JDK version (and gradle, and kotlin, and ...). Use umake to handle your IDE version.
My two cents
In the next week or so, umake should upgrade to NetBeans o. There was a bit of a mixup when Apache took over but the umake maintainers are on the ball.
Or, just download NB 9 directly. You'll have to use an older JDK, as specified in the first answer by user5377037.
Why are you running NB 8.x?
I followed the answer given here:
https://stackoverflow.com/a/27647491/5904193 to install Netbeans ide 8.2 with jdk 10.0.2 on windows 10 64 bits OS.
After installation, I found that the jdk was generally incompatible with the ide. So I finally got the latest Netbeans version 9.1 from Apache.
This works with my jdk so I decided to clean things up by uninstalling Netbeans 8.2. Attempting to uninstall directly with the uninstall executable fails with the same error as the installer. That is it requests jdk 8 or higher (I have only jdk 10 installed).
I then tried using the jar file trick by extracting the Uninstaller and executing the jar file with Java. Things happened (lots of output in the console screen and uninstall actually completed) but all the program files remain, I can still see the program in Programs and Features and I could even start the app using the desktop shortcut that was not even touched by the uninstall.
I suspect I could uninstall it normally if I installed jdk 8. But, I mean, there has to be a way to uninstall it without jdk 8 after being able to install without that jdk. Thanks.
"But, I mean, there has to be a way to uninstall it without jdk 8
after being able to install without that jdk."
There is no reason that should be true since you did not did not meet the "required software" standard for NetBeans 8.2, which states "Java SE 8 is required to install and run NetBeans IDE 8.2", nor did you follow the standard installation process.
So you "installed" NetBeans 8.2, but not successfully. Since it wasn't installed properly it's not surprising that the uninstall process is failing.
After installation, I found that the jdk was generally incompatible
with the ide.
That's because:
You didn't install NetBeans properly.
Regardless of that, NetBeans 8.2 does not support the use of any JDK > 8.
I suspect I could uninstall it normally if I installed jdk 8.
Perhaps, and unfortunately I think that is what you need to try. However, since you chose not to follow the normal NetBeans 8.2 installation process don't be too surprised if you still have problems.
Both Android Studio and Eclipse are asking me to install JDK 6 even though JDK 8 is already installed. Several workarounds online told me change the java_home to point the JDK 8 installation location, done that such that both /usr/libexec/java_home and java -version commands refer to the JDK 8 installation but Android Studio and Eclipse still asking me to install JDK 6. Anyone solved this issue.
Android Studio is based on Intellij Idea 13. The solution here also applies. Just modifying Info.plist from 1.6* to 1.7* did it for me.
Btw, I've observed that at least Android Studio 0.5.5 uses massive amounts of memory. With Java 8 it gets over 2GB for very simple projects. With Java 7 it is still bad, but takes around 1.5GB.
Changing SDK Location also works for Android Studio Project
I've an old machine running Windows XP 32.
Because Oracle dropped support for WXP 32 bits, I've manually installed the jdk following
the awesome answer here:
installing JDK8 on Windows XP - advapi32.dll error
I've however not added it yet to the JAVA_PATH, which is set to jdk 6. I don't know if it would harm or not to add it as well, but I want to be conservative here because a lot of programs in this machine need jdk 6. I don't want to break anything working now.
I'd like to toy around in eclipse to test the new Java 8 features. I've manually added the new jre 8 in the "Installed JREs" section under window -> preferences. In the compiler combo, the highest level available is 1.7 (installed jdk7 some time ago, this time using the official installer, but I still keep java 6 as the default in the system). I don't see any option to add the new level.
Consequently, when creating a new project using the new JRE, a warning is shown saying:
The current workspace uses a 1.4 JRE with compiler compliance level
1.6. This is not recommended and either the JRE or the compiler compliance level should be changed.
Seems a problem derived from the manual installation of the JDK.
I'm using Eclipse Kepler v4.3.1, but I have also tested this in older 3.x install with identical results.
Any help will be appreciated.
Support for Java 8 in Eclipse Kepler 4.3.2 is described here. This basically says specify
http://download.eclipse.org/eclipse/updates/4.3-P-builds/
as the 'Work with' site on Install New Software and select 'Eclipse Java 8 Support'.
Recent builds of Eclipse 4.4 Luna (since 18 March 2014) have Java 8 support included (but Luna is still under development).
Update:
Eclipse Luna (4.4) was released on 25 June 2014