I downloaded JDK for Mac OS X 10.9.1 from Oracle, but I had to install another Java from Apple site once more, as I couldn't launch eclipse with it.
These are two pages that I referred.
Installing Java on OS X 10.9 (Mavericks)
http://support.apple.com/kb/DL1572?viewlocale=en_US
Now I have three java binaries installed in my computer.
Installation A
/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
Installation B
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
Installation C
/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/bin/java
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
I found that I can easily remove Installation C, however I'm not sure if this is OK.
When I invoked java from command line, it points to Installation A.
java -version
java version "1.7.0_51"
ls -alF `which java`
lrwxr-xr-x 1 root wheel 74 Jan 15 09:12 /usr/bin/java# -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
Is there any way to use just one JDK 1.7 for Mavericks by removing two of them safely?
EDIT
After some setup and test, I have only one Java (1.6) installed.
I have Installation B, and now Installation C is linked to Installation A.
For using eclipse, I had to make Compiler Compliance level to 1.6 to use it (from the help java.lang.UnsupportedClassVersionError Unsupported major.minor version 51.0).
EDIT2
This seems to what happened.
Installation of Apple Java
Installation A
Installation B is a symbolic link to A
Installation of Oracle Java
Installation C
Changed the Installation B that
Created a /System/Library/Frameworks/JavaVM.framework/Versions/A
Copied files from Installation C (not symbolic link)
Make a symlink Current to Versions/A
I tried to install Oracle Java only by removing Apple Java, but I got installation error, so I guess Apple Java is needed to install Oracle Java.
Specify the JVM for Eclipse
You can specify JDK version for usage with Eclipse in eclipse.ini. This will resolve problem with starting Eclipse.
-vm
/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/bin/java
Warning: Add this configuration before -vmargs.
Master your Java Environnement with jenv
It is much easier to maintain multiple JDK versions with jenv.
jenv is for a equivalent of rbenv, but for Java environnement. It allow to easily switch between several JDKs installations (already presents), and configure which one to use per project.
Eclipse JDK
Setting JDK in Eclipse
It seems like that the oracle JDK can be just removed. For eclipse, I could add Installation A as a default JRE from Java Build Path -> JRE System Library -> Installed JRES -> Add ...
Related
Is PyCharm made using Java-Swing?
If it is, then how does it runs on a PC where JDK or JRE hasn't been set up yet?
When I look at my own PyCharm installation directory structure, I see a jre64 directory, which contains a Java installation.
And that seems to be a normal JRE:
$ ./pycharm-community-2018.2.4/jre64/bin/java -version
openjdk version "1.8.0_152-release"
OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b8)
OpenJDK 64-Bit Server VM (build 25.152-b8, mixed mode)
So PyCharm comes with a Java distribution which it uses (even instead of an already available Java installation). Instead of my pre-installed and configured java 1.8.0_191, it uses the version it comes bundled with:
When I install myeclipse, it shows "needs java SE6 Environment",
How do I resolve this problem?
I have already installed jdk1.7 in my OS X Yosemite.
/Users/**** $ java -version
java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)
This is a problem with the online installer, which is a 32-bit application while Java 7 on OS X is 64-bit only.
You have two solutions : you can just download the offline installer, which should work fine, according to this support thread.
If this doesn't work, you'll have to install Java 6, which you can find here.
This was a problem with earlier installers. All current installers will not have this problem. Please download the latest release.
I checked my java version from terminal .I got this information
Last login: Sun Mar 15 08:46:08 on ttys000
localhost:~ naveenkumar$ java -version
java version "1.7.0_10"
Java(TM) SE Runtime Environment (build 1.7.0_10-b18)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
localhost:~ naveenkumar$
I install new java 1.8 JRE .close my terminal .Agan i type java -version .I found the same version .
why ? how to upgrade java version.
You installed Java 8 but it didn't overwrite this: /usr/bin/java
The easiest way for you to solve this problem is to install Java 8 JDK, not JRE. After install JDK, your path should be automatically updated.
I just tried to run Eclipse on a Mac Book Pro running OSX Mavericks. I've downloaded both, the 32 and the 64 bit version. Both end up in following Notification:
Version 1.6.0_65 of the JVM is not suitable for this product.
Version: 1.7 or greater is required.
I know that the question was already asked, but my Eclipse won't event start with the 64-bit version, which was the answer for a smiliar question. So I checked the version of my installed Java by running
java -version
In the terminal. The output really confirmed, that version 1.6.0_65 was installed. Here's the output:
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
Now the problem is that when launching the Java Control panel, it says, that Java 7 Update 67 is installed, and there are no updates.
So where's my problem, how get I get Eclipse to run?
You can modify the eclipse.ini and add the path to your JDK7
For versions of Mac OS X 10.7+ the location has changed to
-vm
/Library/Java/JavaVirtualMachines/<''jdk_name_ver''>/Contents/Home/...
To be safer, determine the location for the JDK you intend to use via the utility /usr/libexec/java_home and put this value with .../bin/java appended into the eclipse.ini file.
See "How to install JRE 1.7 on Mac OS X and use it with Eclipse?"
I installed JDK, "Java SE Development Kit 8u101", in addition to JRE and eclipse started to work fine.
I'm trying to install JDK 1.7 update 21 on Mac OSX 10.7 .
I downloaded the installer from oracle site (as dmg file). ran the installer which completed successfully.
Now I can't find the java SDK anywhere on the file system.
The output of /usr/libexec/java_home -V is :
***/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home***
which is the previous version installed.
also running java -version executes the same old version.
***Java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)***
In the java control panel I do see that the JRE has updated to Java 1.7 for the browser but there aren't any details regarding the JDK there.
Where can I find the new JDK on the file system and how do I set it as default ?
Is there any log file for the installation that I can use to debug ?
Try adding this to your shell startup script (.bash_profile off of ~ if you are using bash):
export JAVA_HOME=`/usr/libexec/java_home -v '1.7*'`
The changeover from Apple providing the JDK to Oracle has been a complete disaster.