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.
Related
Recently, I want to upgrade my java from 8 to 11. Then checking my machine using java -version, it shows as follows:
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)
Then, I think there is only java-8 there. But then I use homebrew with brew install java11 it shows this:
==> Formulae
app-engine-java java javacc jslint4java pdftk-java
google-java-format java11 ✔ javarepl libreadline-java
==> Casks
eclipse-java eclipse-javascript oracle-jdk-javadoc homebrew/cask-versions/java-beta
If you meant "java" specifically:
It was migrated from homebrew/cask to homebrew/core.
I am confused now: are these 2 versions installed in my machine, or only one there? If 2 here, how to I specify the path if I want to use java11.
In Homebrew, java11 is an alias for the formula openjdk#11. What you want is a cask, specifically temurin11, which can be installed by running this command:
brew install homebrew/cask-versions/temurin11
(Temurin is the official successor of AdoptOpenJDK.)
I'm trying to install JRuby-9.1.13.0 with rbenv on MacOS.
The issue is that for some reason still Java 7 (1.7) is required, which no longer officially supported.
rbenv install --verbose jruby-9.1.13.0
ERROR: Java 7 required. Please install a 1.7-compatible JRE.
BUILD FAILED (OS X 10.13.1 using ruby-build 20170914)
The JRuby wiki mentions that Java SE should be installed, but not which specific version.
Installed is Java 9.
java -version
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
A Java 8 version is also installed.
jenv versions
system
* 1.8 (set by /Users/<folder>/.java-version)
1.8.0.152
9.0
9.0.1
oracle64-1.8.0.152
oracle64-9.0.1
Is Java 7 really a requirement for installing JRuby and therefor my setup is wrong?
Or is this an issue of JRuby or rbenv and installing JRuby should be also possible with Java 9 (Java 8)?
IIRC I fixed the jenv setup and switched to Java 1.8, then I was able to install JRuby.
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
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
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.