I'm trying to update from Java JDK 1.6 to 1.7 and have downloaded the version 7 JDK for mac (I downloaded jdk-7u71-macosx-x64.dmg from http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html)
However after running the installer, which executes, says its installing and copying the files, then indicates the installation was successful I can't find where they have installed to.
I can see the previous version of the jdk is installed at /System/Library/Java/JavaVirtualMachines/1.6.0.jdk.
But there's no sign of 1.7, nor using spotlight can I find any other .jdk or anything called 1.7.* anywhere on my machine, despite the JDK installer saying it was successful (I've tried running the installer a few times).
If the installer is saying it was installed why can't I find it? Is it supposed to have gone into /System/Library/Java/JavaVirtualMachines/ like the 1.6 one, if so why isn't it and how can I install it when the installer is saying it did so?
[OS X 10.9.5]
You installed the JDK yourself so it won't be in /System.
Try looking in /Library/Java/...
You'll need to add this new runtime to your path to get it to work on the command line.
Related
Still trying to get Eclipse IDE to work and running into Incompatible JVM error. I followed the steps here: I installed Java 7 but Eclipse keep saying that 1.6 is not suitable for this product
But unfortunately to no effect. Running OSX 10.9.5 and uninstalled the out-of-the-box version of Mac. The new version of Java seems to show up in the System Preferences. Please see attached screen capture. I've even done some of the basics like restart my computer, etc. Maybe there are other modifications I need to make to other files. I'm comfortable with Terminal but new to Eclipse and Java.
I have had the same problem as noted above. I could not get Eclipse to install because of Java incompatibilities. The sequence I followed goes like this:
Upgraded to MAC OS Sierra
Downloaded the Eclipse installer but was prompted that I needed to instal a legacy Java.
Installed Java 1.6
Was unable to install Eclipse and was prompted that I needed Java 1.7 or greater. Downloaded and installed Java 1.8
Ran the terminal code 'java -version' // this will check your jre version. This showed returned Java 1.6 despite the fact that I had upgraded to 1.8. The Java version listed in the Java control panel said 1.8
Tried multiple downloads of eclipse and Java and multiple restarts always with the same result.
Visited the Oracle web page noted above:
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html I could not find the above reference to 8u73 and 8u74 but I did find and option to download 1.8.0_12. I did this. It installed without difficulty, and then I was able to install Eclipse without difficulty.
This took hours of my time. I hope this proves useful.
OK, so I don't really know what the problem was, but I simply fixed it by navigating to here http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html and installing 8u74 instead of 8u73 which is what I was prompted to do when I would go to "download latest version" in Java. So changing the versions is what did it in the end. Eclipse launched fine, now. Thanks for everyone's help!
edit: Apr 2018- Now is 8u161 and 8u162 (Just need one, I used 8u162 and it worked.)
JRE is a Run-Time Environment for running Java stuffs on your machine. What Eclipse needs is JDK as a Development Kit.
Install the latest JDK (and not JRE) from http://www.oracle.com/technetwork/pt/java/javase/downloads/jdk8-downloads-2133151.html and you should be good on Mac!
Open up terminal and check what java version is currently set in your path variable.
You can do that by typing in your terminal
java -version // this will check your jre version.
javac -version // this will check your compiler version
If this shows incorrect java version but you have installed java 1.8 then you have to set path variable to the newer version of java.
To do that do add the line:
export JAVA_HOME=/path/to/java/jdk1.x
to ~/.bash_profile (same as /Users/username/.bash_profile)
Then do this from the terminal to set the new variable
source ~/.bash_profile
Also what's your eclipse.ini set to ?
-Dosgi.requiredJavaVersion=1.7
EDIT:
Please open up terminal and type
find / -name "java" // This should find all folder named java on your file system.
Also how did you install java in the first place ?
Echoing the answer, above, a full install of the JDK (8u121 at this writing) from here - http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html - did the trick. Updating via the Mac OS Control Panel did not update the profile variable. Installing via the full installer, did. Then Eclipse was happy.
Here are steps:
download 1.8 JDK from this site
install it
copy the jre folder & paste it in "C:\Program Files (x86)\EclipseNeon\"
rename the folder to "jre"
start the eclipse again
It should work.
For some weird reason "Java SE Development Kit 8u151" gives this trouble. Just install, "Java SE Development Kit 8u152" from the following link-
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
It should work then.
I just download Android Studio and installed it on my computer. I previously had installed the JDK Development Kit also (jdk1.8.0_65).
When I try to open the program I get the following error: "No JVM installation found. Please install a 64-bit JDK. If you already have a JDK installed, define a JAVA_HOME variable in Computer >... etc."
I created the variable and pointed it to the location of my JDK and restarted my computer but the same error keeps popping up. What am I missing?
Computer Specs
Windows 7 64bit
JDK installed: 1.8.0_66-b18
You should use 64 bit version of JDK, I suspect you are using 32 bit. You can manually uninstall the current version. See How to uninstall JDK
Once this is done install 64 bit JDK from here
Make sure you click the correct executable (studio.exe or studio64.exe) depending on your environment when launching Android Studio, otherwise you might see the message "No JVM Installation Found".
I tried installing Android Studio, but I fail every time due to a JDK error.
Even when I select the requested path the installer still can't find it.
I have added the JAVA_HOME and JAVA_JDK variables with no luck.
Mind that when I open CMD and type java -version I get 1.7.0_79 and with the javac -version command I get 1.7.0_79.
Anything else I should try?
1.First open the Control Panel.
2.Uninstall every JDK you have installed.
3.Install JDK 1.7 or later.
4.Install Android Studio on the same drive where you installed JDK to.
I downloaded Eclipse (specifically that for C/C++ Programming) for Mac, running OSX Mavericks. When I try to start Eclipse, it gives me this message: "Version 1.6.0_65 of the JVM is not suitable for this product. Version 1.7 or greater is required", and it doesn't open. I installed Java version 7, but nothing changed. I don't know how else to update the JVM (I don't know much about Java in general).
I downloaded the 64-bit version for my MacBook Air, if that matters.
Simply Install the JDK 7 or JDK 8, and not just the latest JRE.
Run whereis java in a Terminal. It will normally display something like /usr/bin/java.
Now run java -version. It shows you 'java version 1.6.0_65' or something approaching. This is because Java 7 does not replace Java 6. Java 7 is installed as an Internet Plug-in and can be found in /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java.
What you need to do is to symlink /usr/bin/java to /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java.
Restart Eclipse, or reboot your computer (I don't know how Eclipse manages this), and it should do the trick. :)
I went to oracle downloads and the scrolled one of the several Mac osX links and downloaded jdk-8u73-nb-8_1-macosx-x64.dmg from oracle and that fixed the problem. I don't know why updating java doesn't do the trick.
add this script into 'eclipse.ini' at the top
'/Library/java/JavaVirtualMachines/jdk1.8.0_77.jdk/contents/Home/bin'
Trying to install eclipse, I installed java version 1.6.0_65 as it requested yet still was blocked from finishing the Eclipse install with the error that I needed 1.7 JVM or higher - not true, installing higher didn't work either. I tried installing jdk-8u101-macosx-x64.dmg and that didn't work. So, I tried JDK 7 as advised, sorry no good.
So, to get the Eclipse installer to run with out that java error I had to edit the Info.plist inside the Eclipse Installer. Right click the Eclipse installer and show package contents, then open info.plist in textEdit.app
(Note: So after several tries editing this plist and following methods mentioned elsewhere nothing worked, I found that you have to use the symlink or java alias because java is installed differently now a days as an internet plugin.)
Where you want to make an edit (You should probably Backup the original or you can download it again), under <key>Eclipse</key>, then <array>, delete out what's there and add <string>-vm</string> and this string underneath; <string>/usr/bin/java</string>
Here is what mine looks like.
<key>Eclipse</key>
<array>
<string>-vm</string>
<string>/usr/bin/java</string>
<string>-keyring</string>
<string>~/.eclipse_keyring</string>
<string>-showlocation</string>
</array>
Then save and try running your eclipse installer; this worked for me.
Just running the below command from there terminal worked for me.
brew cask install java
It updated my idk with 1.8, and after that eclipse opens successfully.
I'm using latest version of Eclipse Luna on Mac OS X 10.9.4. Whenever I try to open the Eclipse it says "version 1.6.0_65 of the JVM is not suitable for this product, version 1.7 or greater is required". I installed java 7 (JRE, I don't need JDK) but still I'm getting the same error. I tried java -version and the output was "java version 1.6.0_65". I can see the java icon on my system preferences. I also restarted my Mac to see if that works but that doesn't help either. I searched on google and some people suggesting other users to change Eclipse.ini file, the instructions wasn't clear and I'm a java beginner so I've no idea where and what to edit. Any step by step instructions will be appreciated.
I had this same problem with a fresh install of Eclipse Mars on OSX. I had installed the JRE from https://java.com/en/download/ (which is the top google search result for "java download" for me.
This failed for me with the same message "version 1.6.0_65 of the JVM is not suitable for this product, version 1.7 or greater is required"
Then I saw a comment that I should get the JRE/JDK from oracle instead:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
After downloading the most recent JDK from Oracle Eclipse starts fine.
A potential solution to your problem might be to uninstall Java6 (provided by Apple itself) and only have Java7 installed in your system. This only applies in case you have no applications that desperately need the old Java6 version to be installed.
To remove the Apple-like Java6 installation open a Terminal and:
sudo rm -rf /System/Library/Java/JavaVirtualMachines/1.6.0.jdk
After this step you should only have Java7 by Oracle installed in your system. To verify, open another terminal and do a:
java -version
It should display something like "java version "1.7.0_XX" where XX is the current update version of the Java7 installation. If not: proceed with the next step.
Redefine the JAVA_HOME variable (to support IDEs like Eclipse and other developer tools...), which helps detecting where the "active" Java installation is situated in your system. Open a terminal and (Note: replace XX first!):
sudo rm /Library/Java/Home
sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.7.0_XX.jdk/Contents/Home /Library/Java/Home
Afterwards, a fresh installation of Eclipse should detect Java7 in your system and should work with this version out of the box. You can modify an installed Eclipse to use this installation by navigating in Eclipse to:
Preferences -> Java -> Installed JREs. Then remove the old Java6 system entry AND add new path (see above) with the name Java7.
You can modify Info.plist inside Eclipse.app (right clic on Eclipse.app --> show package contents) and specify -vm after <key>Eclipse</key>.
For example :
<key>Eclipse</key>
<array>
<string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home/jre/bin/java</string>
<string>-keyring</string><string>~/.eclipse_keyring</string>
<string>-showlocation</string>
</array>
Ensure you installed the jdk 7 or above. If you have a Mac you most likely have 1.6.0.jdk. To check your java development kit (jdk) version go to the terminal and browse to:
/Library/Java/JavaVirtualMachines
Next, if you see 1.6.0.jdk then you did not install the latest version of the jdk. Go to http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html to install the latest jdk. Next use the browse out to the same file path aforementioned and ensure the latest jdk is in there (i.e. jdk1.8.0_141.jdk).
To specify Java 6 for OS X:
-vm
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java
For versions of Mac OS X 10.7+ the location has changed to
/Library/Java/JavaVirtualMachines/<''jdk_name_ver''>/Contents/Home/...
eclipse.ini > Specifying the JVM
Try any of these solutions
How do I run Eclipse using Oracle's new 1.7 JDK for the Mac?
Mountain Lion with Java 7 only
Eclipse still using java 6 as jre on Mac OSX
As I found out, we don't need to un-install an existing Java 1.6. Just installing or deploying a newer version 1.7 or 1.8, and setting the JAVA_HOME, along with the below given activities will solve the issue.
Check your c:/Windows/System32 (as I had this issue in windows). You will find junk java processes (java.exe, javaws.exe etc). Delete them all.
Deleting just java.exe will reflect in your PATH but eclipse still picks the javaws from c:/windows/system32. This is because, usually in PATH, you will have C:/Windows/System32 as the first entry. So, this will override any JAVA_HOME entry in the path.
Try starting the eclipse. It should work like charm! Atleast it did for me.
Try this
https://gist.github.com/johan/10590467
You might have to disable SIP and reenable it.
Okay so I have been struggling with this issue for a few days with Eclipse Neon and Oxygen. I was doing the below steps -
Check java -version from Terminal. It showed version as 1.7
Go to System Preferences -> Java -> Update Java version. Version 1.8 was downloaded and updated.
Went to Terminal again to confirm and this time it showed the version as 1.8.
But it still didn't work!! What was I missing now??
Here is what you need to keep in mind -- By default when you type the below command it shows the JRE version.
java -version
You need JDK to start your Eclipse installation. Please go to Java download page
and download the latest JDK version and you should be good to go.
Don't try to remove the Java in /System/Library/ - firstly this will not be allowed (you need to login as root user) and secondly you don't know the dependencies this Java version has on your other applications. Hope this helps!
Check your system variables ($JAVA_HOME specifically). This may be helpful:
http://www.mkyong.com/java/how-to-set-java_home-environment-variable-on-mac-os-x/
Install the updated JDK
Update the environment variables: here's how
If still not working uninstall the older JDK
I see that you have installed the Java plugin and not the jdk. You can download the JDK from Oracle Downloads section.
You can remove the Java Plugin and install JDK from oracle downloads to resolve your issue.
I have had the same problem as noted above. I could not get Eclipse to install because of Java incompatibilities. The sequence I followed goes like this:
Upgraded to MAC OS Sierra
Downloaded the Eclipse installer but was prompted that I needed to instal a legacy Java.Installed Java 1.6
Was unable to install Eclipse and was prompted that I needed Java 1.7 or greater. Downloaded and installed Java 1.8
Ran the terminal code 'java -version' // this will check your jre version. This showed returned Java 1.6 despite the fact that I had upgraded to 1.8. The Java version listed in the Java control panel said 1.8
Tried multiple downloads of eclipse and Java and multiple restarts always with the same result.
Visited the Oracle web page. I could not find the above reference to 8u73 and 8u74 but I did find and option to download 1.8.0_12. I did this. It installed without difficulty, and then I was able to install Eclipse without difficulty.