JDK 1.7 not shown in Program Files folder - java

I have started developing an Android application in Android Studio. After starting Android Studio it gives me an error: "compileSdkVersion android-21 requires compiling with JDK 7". So I ran java -version at the Commmand Prompt and it shows I have 1.7. But in Program Files there is a folder for JDK 1.6 but not for 1.7. JRE of 1.7 is there, but not JDK 1.7.
Any suggestions will be appreciated. Thanks in advance.

Try "javac -version" instead of "java -version" to confirm JDK installed version
It seems that you have a 1.7 Java Runtime but only 1.6 SDK installed.
Just get the correct SDK installer from java.com.

Uninstall all jres and jdks, reinstall the jdk you need (jre is included). Be carefull with the bit-versions, always install the correct one

new:
Idea is you can simply set you projects jdk any version you want, different from os installed one, just make sure you download it and referenece from the android studio
Same story different interfaces, donno if downvotes were necesary
https://askubuntu.com/questions/467870/how-to-set-the-jdk-for-android-studio
androidstudio set java version 1.7
old(sry tought is eclipse):
How to change JDK version for an Eclipse project
And make sure you have jdk available for eclipse to set it incase you dotn have it. Else just change type

Related

JRE Missing when installing eclipse

So I'm trying to install Eclipse IDE for Java on my main pc.
I had no problem installing it on my laptop but when trying to install it on my PC I get JRE Missing webpage.
I've installed the JDK and JRE and they are both working. I could use some advice.
i also had the problem with eclipse and the JRE.
Try to delete the 2 Java versions and deinstall eclipse.
then install the JDK first and seccond the JRE. after the 2 installations install the new eclipse version(in the installer you chan choose between some installations take the first).
i hope I can help you.
Unless explicitly told in eclipse.ini Eclipse uses the system wide java command.
Easiest for you right now is to install a system wide JRE (same 32/64 bit flavor as eclipse).
I had the same issue. It was happening when installing different match of JDK version (11 in my case), with JRE (8 in my case).
So, in order to have this installation of Eclipse working make sure that you have both JDK and JRE referring to the same version. Installation will not work if they have different versions.

How do I uninstall Netbeans 8.2 ide previously installed with jar file?

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.

Eclipse Oxygen JVM Error

I'm just getting back to java, and went and downloaded the latest Eclipse Oxygen. Once it's all installed, I try to launch and get the following error dialogue.
So I went and downloaded Java 8 and installed that. Once again I tried to open Eclipse. It still displays the exact same answer. Any idea on how to fix this?
On macOS you must install the full JDK - the JRE install isn't enough.
Get the full JDK from the Oracle site here.
If you install Java 9 you will need to use at least Eclipse Oxygen.1a (4.7.1a) but preferably the current Eclipse, for eariler versions of Eclipse install Java 8.

Where is installed JDK 1.7 on mac

I'm getting a problem with Android Studio "Gradle project sync failed" it also says compileSdkVersion android-21 requires compiling with JDK 7. I have installed jdk-7u71 then running in the terminal usr/libexec/java_home -v 1.7 tells me the JDK is in /Libary/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Content/Home unlike v 1.6 which is in System/Library/Java/JavaVirtualMachine, however when I go on finder I can't find the Java folder in Library. Also when I add the path to JDK location in the Android Studio I get an error saying Please choose a valid JDK directory. Where is this jdk1.7.0_71.jdk then?
According to my mac, my JDK folder is:
/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/
You may find it there. If you cannot, try to reinstall it.

Error: jdk1.7 or higher needed to run Google plugin for eclipse

I have been trying to make this work all day long but there seems to be no end to my frustration. I want to use Google App Engine for my android application. I have downloaded the jdk 1.7 u51 but still whenever i start the eclipse ADT, a dialog box appears saying that jdk 1.6 is in use; jdk 1.7 or higher needs to be installed. I have set the path in the preference to jre inside the jdk 1.7. Also, the app engine SDK path shows the error "Failed to initialize App Engine SDk[path]". I have referred all the threads here and over the internet relating to this issue and have tried all the proposed solutions but to no avail. Any help would be greatly appreciated.
versions
eclipse 4.2(ADT)
JDK 1.7u51
App Engine SDK 1.8.9
Try uninstalling the old java version, and making sure that the latest version is the only one installed. Another problem might be if you have a 64-bit computer, you may have the older version installed to one program files, but Eclipse is looking through the x86 program files and not finding the correct version(or vice-versa). You may also want to set your PATH and CLASSPATH.
Type
java -version
javac -version
into the command prompt, and it will return with what Java you have installed.
If all else fails, try reading https://developers.google.com/appengine/docs/java/gettingstarted/installing for more information and see what went wrong.
You must have matching architecture for Eclipse and JDK. If you are using 32-bit eclipse, then use 32-bit JDK else use 64-bit versions of both.
Everything else will fall in place automatically
I am using Indigo and found this forum thread to do the trick.
To your eclipse.ini file add
-vm
/Library/Java/JavaVirtualMachines/jdk1.7.0_WHATEVERTHESUFFIXIS/Contents/Home/jre/lib/server/libjvm.dylib
Note the suffix "lib/server/libjvm.dylib" which is not what you use for later versions of Eclipse. (For them you link to "bin/java".) This needs to be above any "-vmargs" flags in eclipse.ini.

Categories