Cant run eclipse on my Mac - java

I installed the latest version of Java and when I try to run eclipse it says:
Version 1.6.0_65 of the JVM is not suitable for this product. Version: 1.8 or greater is required.
I searched many forums and found the java -version command. When I run from the terminal I get:
java version "1.6.0_65" Java(TM) SE Runtime Environment (build
1.6.0_65-b14-466.1-11M4716) Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)
But when I open Java on my system preferences it says I have 1.8.
Why? What do I do?

It says 1.6 because it is the pre-installed version in your system. But in order to install different version of Java, you need to install the latest development kit from Oracle's website i.e. http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Related

What version of Java is "1.8.0_191" on my Ubuntu install?

On of our (remote) developers needs to install FDT (an Eclipse based IDE) to compile some legacy ActionScript code. I've got FDT working on my Ubuntu 18.04 laptop just fine, but the dev is having trouble getting it to work on his Mac. When he has Java version 7, 8 or 9 installed he gets a message saying
we need legacy java you can download it here...
and if he uses Java version 6, it says it needs version 7 or more.
So I checked which version I have on my Ubuntu 18.04 laptop so he can get the same one, and to my surprise it says:
$ java -version
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)
As far as I know Java is WAY ahead of version 1.8. So I logged into our production server (Ubuntu 16.04) and there we've got something similar:
$ java -version
openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-0ubuntu0.16.04.1-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)
I checked out the OpenJDK website and there it says OpenJDK is now at version 11.
What version of Java my laptop is actually running so our dev can get the same version?
You are using Java 8.
The Mac problem is a historic one because the legacy question is for a 32-bit JVM for some programs and you need a 64-bit for Java 8.
Install the Java 6 the programs want and then install A newer java from oracle and he should be good to go.

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.

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.

Eclipse Luna requested Java 1.8 but failed

I downloaded Eclipse Luna and ran from the terminal in Mac OS X:
> /Applications/Eclipse.app/Contents/MacOS/eclipse
JavaVM: requested Java version (1.8.0) not available. Using Java at "/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home" instead.
However, I have:
> java -version
java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)
What am I doing wrong?
Luna seems currently having a bug: it installs the wrong Java version as its own dependency and then fails claiming that version is wrong.
You need to install Java separately (download official SDK from Oracle website) and make that one default. Be sure you install SDK and not the web plugin. Type java -version to verify the version and then which java to tell the exact path. Edit eclipse.ini as usual and set there the correct path to Java executable.

javadoc doesn't found in my linux machine

I'm running on ubuntu 12.04 and when I put in the terminal java -version I got this message:
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)
but despite that, if I put in the terminal javadoc I receive a message as it isn't installed in my machine.
The Java Runtime Environment (JRE) doesn't include javadoc. It includes only the things required to run Java programs, not to develop them.
You need the JDK (Java Development Kit) which includes developer tools like javadoc, in addition to everything found in the JRE.
See the Ubuntu Java documentation.

Categories