I use Linux Mint 17 "Qiana" and I've downloaded and installed IntelliJ IDEA to learn Java. Now, while trying to set up JDK for a new project, I get an error The selected directory is not a valid home for JDK. The path to JDK I try to use is /usr/lib/jvm/java-7-openjdk-i386. I also tried to use /usr/lib/jvm/java-8-oracle/bin but it does not work as well. Is there any way to fix it without some magic or shamanry?
P.S. When I try to set a new Android project (what is the purpose of my Java studies) up, it doesn't see my Android SDK as well.
P.P.S. When I first faced this problem, I installed IDEA as a common user. So I removed it and re-installed using root privileges but that didn't work. :(
I haven't tried this yet but I'm pretty sure it should be /usr/bin/java/ location.
Try /usr/local/java.
https://askubuntu.com/questions/130186/what-is-the-rationale-for-the-usr-directory
I understand it is Ubuntu but it's worth a try
Related
I run the windows 10 64 bit version of Eclipse. The first time I log onto Eclipse it works just fine (though I haven't fun any code yet, so I'm not sure if that works) but upon closing and reopening Eclipse it says, "Version 1.8.0_301 of the JVM is not suitable for this product: version 11 or greater is required." and immediately quits. I have downloaded jdk 16 and installed it. Redownloading Eclipse fixes it until I close it again. How can I fix this? I am a new Java programmer and am not experienced with any of this.
You should have a folder like ths: C:\Program Files\Java. In there, there should be a folder named 1.8.0_301. Delete this folder and reinstall java.
I had the same problem, this solved it for me...
First of all I suggest you check the version of your eclispe IDE. You may have downloaded a version that doesn't supprot your installed jdk.
This link should provide you with the suitable jdk version for every eclipse version.
https://wiki.eclipse.org/Eclipse/Installation.
I hope I helped you a bit.
Cheers!
I had this problem with Java version 1.8.0_351.
In the program management settings of Windows I removed Java 8. After that, my Eclipse installation worked fine.
I'm using Eclipse to program Android applications, and when I opened the program yesterday, it popped up an error saying I need to install JRE - I've downloaded the JRE and installed it - when during the installation I got a message saying that the JAVA version I have on the computer (Version 7) is too old for the JRE (Version 8), and that I need to update the JAVA also.
I did so, and then opened up the Eclipse again - And all of the projects,that before worked great, are now full with errors.
I tried installing all of the SDK updates - didn't work, also tried uninstalling Eclipse and re-install it - also didn't work.
The errors I get are: "XXX cannot be resolved to a type" - in amost every single line in the project.
How do I fix it??
Thank you!!
android development tool(adt) are install.. and all update SDK and then import an old program.. Ithink then work.
I would suggest to check that your java build path is functioning properly. This kind of error for me usually means that eclipse cannot find the JRE installation.
Form eclipse you can go to Project->Properties and check for any errors there. Any inconsistency there would cause all your projects to fail.
First of all, you need the JDK installation, not JRE. Second, Android currently supports up to Java v7, which means you'll need to get JDK v7 from here. Make sure you download the correct 32-bit or 64-bit JDK version for your operating system.
Also, ensure your Android SDK and Android Development Tools (ADT) are on the same released version. Different versions of Android SDK and ADT can lead to many unforseen problems.
I have just installed the JDK1.8.0 32 bit version on my computer and that all seemed to work nicely. I then followed the instructions on this stackoverflow page to add tools.jar to the Eclipse (although, to be honest, I'm not quite sure what that means?). I'm still getting the error: "Requires JDK 5.0 or later. Please download it from http://java.sun.com/j2se/1.5/".
Could someone please help me understand what the problem is? Also, please let me know if I haven't given enough information, this is my first attempt at using Eclipse and I don't know if you need any other info.
Thanks
Mike
The Oracle JDK installation does not install Java in the location where Eclipse by default looks for it.
I would suggest that you go to http://java.com/en/download/installed.jsp and follow instructions to get a default Java installation on your system.
Eclipse will then use that to run itself. You can then tell Eclipse about your Java 8 JDK in Preferences -> Java -> Installed JRE's and that it is to be used by default by the projects you write.
Note that there is not full support for the new Java 8 facilities in Eclipse yet. That will most likely come in Eclipse 4.4 scheduled for June (http://wiki.eclipse.org/Simultaneous_Release)
When you make a new project, make sure it's using the JRE you want. You may have to change it from default to "use project specific JRE", and then select the 1.8.
I downloaded the ADT bundle for windows in the android developers website. I'm expecting that once I extracted them on my C: it will just run smoothly. Unfortunately, I'm getting this error
Any ideas on what's causing this? Already downloaded java from oracle website. C:\Program Files\Java\jdk1.7.0_25.
Edit:
For those asking the version of my OS. Here it is.
So I'm sure I downloaded the right version of the ADT.
It seems like you have downloaded wrong version of Adt. Are you sure that it is suitable for your pc? Is your computer 64-bit?
Check if it's the 32-bit or 64-bit version. If that doesn't work, re-install java. The jvm.cfg file is an internal file and should not really be touched, but it seems Google might have a custom one for the emulator or something. If that still doesn't work, open SDK Manager and install everything they have. Otherwise I dunno.
I don't know what is the real problem but I uninstall JRE and install again ..Now its perfectly working .
So I have been experiencing this problem for a while. I can use my existing java projects which I created on my PC, but on my laptop I can't create new Java projects. I reinstalled the program & reinstalled modules several times.
So when I click on new project, every java-type project is in the list except the regular one called 'java'... And the funny thing is that Java is the only project type I need at the moment, but it's simply not showing up..
I've looked on the internet for an answer but all I could find was one topic which was unanswered.
Help would be appreciated, a lot.
EDIT: OS: windows 7 64 bits. Using Netbeans 7.2 I think, well the newest for sure.
I just solved this problem by simply deleting .netbeans folder in User\<User>\ and .superId in \AppData\Roaming\NetBeans\
No need to reinstall.
Unfortunately you left out the OS you are using and you didn't mention the version of netbeans you tried!
You should completely uninstall netbeans. On UNIX OSes you'll find the .netbeans Folder in your homedir where netbeans keeps a lot of information. Remove this folder too (I don't know where this folder is stored on Windows OSes).
Having removed both netbeans and this folder, try a re-installation. Now things should look much better!
In my case I have installed multiple JDK (JDK version 8 and 9) due to which Netbeans 8.2 might not working as expected and then I was unable to create project.
Then I removed JDK9 and cleared cache from \Users\admin\AppData in windows.
Then I was able to create Java Project.