Can't start Eclipse on OSX (Version not suitable) - java

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.

Related

How to update java on macOS Sierra 10.12

I am trying to install eclipse-cpp oxygen on macOS Sierra 10.12. While installing it i get an error that java version is not 1.8, while I had already installed latest JDK package. on terminal it shows java version as below
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-468-11M4833)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-468, mixed mode)
Please suggest how can I upgrade my java version.
Apple don't provide a version of Java greater than Java 6. You must install Java 8 from the Oracle site.
In order to run Eclipse you must install the full JDK, the JRE download is not enough as it does not include the java executable.
The Oracle site is here
You can install Java8 from here.
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
make sure to check the latest binaries of java and javac in PATH. You can override the old java binaries in path.

Eclipse Neon installation fails because of missing JRE/JDK

it opens a web browser and a page tells me that I have to install either JRE or JDK version 1.7.0 or higher. I have installed JRE 1.8.0, in fact in command line I can see:
d:>java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) Client VM (build 25.121-b13, mixed mode)
I also setup JAVA_HOME and PATH accordingly but no luck. Is there something else I can try?
Thanks
I found the issue: I installed JRE X86 while Eclispe wanted the X64 version. I have installed it now and the installation process goes on. I didn't install JDK because I want Eclipse for C++ I don't need Java things. Thanks anyway, I hope this will help others!
You need the JDK installed to run Eclipse, or even better, to develope java apps at all...
verify that by doing in a terminal:
>javac -version

Install Myeclipse shows a java error

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.

Multiple Java installations in Mac OS X Mavericks

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 ...

Why doesn't netbeans 7.3 see that I've installed Java 1.7.0_21?

I've recently installed netbeans 7.3 on my Mac (Lion 10.7.5, up-to-date).
At the command line, I would get:
[129]$java -version
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06-451-11M4406)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01-451, mixed mode)
Today I went to the netbeans plugin window and found 18 updates to install. When I attempted to do this, I received a message that some of them require > Java 1.7, and I only have 1.6 (as indicated above). So I dutifully ran out to java.com and downloaded Java 1.7 Update 21 successfully.
When I run a Java version checker in various browsers I see a report that Java 1.7.0_21 is the installed version. In addition, the Mac's Java Control Panel also indicates that 1.7.0_21-b12 is the current version.
However, upon restarting netbeans, it still has the same complaint that Java 1.6 is in use. I've rebooted the machine and get the same result. And, the result of 'java -version' at the command line also still shows the same result as above (1.6.0_45).
And, finally, even if I try something like:
/usr/libexec/java_home -v 1.7.0_21 --exec java -version
I get:
Unable to find any JVMs matching version "1.7.0_21"
I'm baffled. Does anybody have any advice on this?
Thanks.
Doug
netbeans will be using it's own version of the the JDK try this
where-can-i-set-the-jre-jdk-which-is-used-to-run-netbeans-besides-the-command-line

Categories