How can I use JRE 1.8 with Eclipse Neon? - java

Trying to run Eclipse Neon I'm getting this error:
To open “Eclipse” you need to install the legacy Java SE 6 runtime.
Instead of the legacy JRE, I have already installed JRE 1.8 from Oracle:
➜ /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
However, I can also see it is not available in the path:
➜ java -v
No Java runtime present, requesting install.
➜ /usr/libexec/java_home -v 1.8
Unable to find any JVMs matching version "1.8".
No Java runtime present, try --request to install.
➜ ls /Library/Java/JavaVirtualMachines

On macOS you must install the full JDK to get complete Java support. The JRE is not sufficient as it only installs the browser plugins.
The current download for the JDK is here

Related

centos using older version of java

I want to install open office in my centos linux and as part of the requirement is jdk 11.0.2 version.
I installed new version of java JDK 11.0.2 however when I use the command java -version it is still showing that it is using old version of java.
java -version
openjdk version "1.8.0_262"
OpenJDK Runtime Environment (build 1.8.0_262-b10)
OpenJDK 64-Bit Server VM (build 25.262-b10, mixed mode)
i created the file /etc/profile.d/jdk11.sh and ran the command below
"source /etc/profile.d/jdk11.sh"
the file contains
export JAVA_HOME=/usr/local/jdk-11.0.2
export PATH=$PATH:$JAVA_HOME/bin
Given that you are using centOS:
try the following command:
sudo update-alternatives --config java
It should show you the list of available Java versions in your system. You can switch using the numbers shown in the result of the command.

Update Java version in Windows 10 WSL

I had openjdk 11.0.2 installed. I upgraded the java version by running
sudo apt update
sudo apt install openjdk-11-jdk
If I run sudo apt install openjdk-11-jdk again, it shows a message saying that "openjdk-11-jdk is already the newest version (11.0.11+9-0ubuntu2~20.04)"
However, when I do java -version it displays the older version 11.0.2 not 11.0.11
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
The JAVA_HOME still shows "/opt/java/jdk-11.0.2", so I guess this might be the problem that the java -version is still showing the older version?
When I do whereis java it shows
java: /usr/bin/java /usr/share/java /opt/java/jdk-11.0.2/bin/java /mnt/c/Program Files/Common Files/Oracle/Java/javapath_target_917640/java.exe /usr/share/man/man1/java.1.gz
Not sure where the newest version was installed so that I can make the JAVA_HOME point to that one
openjdk-11-jdk-headless_11.0.11+9-0ubuntu2~20.04_amd64.deb and openjdk-11-jre-headless_11.0.11+9-0ubuntu2~20.04_amd64.deb package shows (by extracting with 7-zip) that OpenJDK 11 will be installed at /usr/lib/jvm/java-11-openjdk-amd64.
This will give you enough information about appending environment variables such as PATH and JAVA_PATH.
And, there may be a path called default-jvm or so, you may use that path accordingly.

Error: This application requires a jre 1.6.0

I have an application emSignerGSTN in my windows 10 machine. But while trying to run the application, I get the error:
This application requires a jre 1.6.0
I have openjdk installation of Azul Zulu :
$ java -version
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (Zulu 8.40.0.25-CA-win64) (build 1.8.0_222-b10)
OpenJDK 64-Bit Server VM (Zulu 8.40.0.25-CA-win64) (build 25.222-b10, mixed mode)
$ where java
C:\Program Files\Zulu\zulu-8\bin\java.exe
The oracle java installation makes the application work. But I don't want to install it. How can i solve this?
I resolved the problem. I have a JRE 1.8.0 installed in the machine. The problem is that the application doesn't look into that path. Java installation path is:
C:\Program Files\Zulu\zulu-8\bin\java.exe
Copy the JRE folder of zulu jdk C:\Program Files\Zulu\zulu-8\jre to emSigner installation path as C:\Program Files (x86)\eMudhra Limited\emSigner\emSigner\jre.
When running the application, emSigner will look for the JRE first in its installation path. Since it exists now, there is no need to look for an oracle JRE installation. Thus further errors are not shown.

Trying to run an Android project in IntelliJ: Error:Abnormal build process termination: Error: This Java instance does not support a 32-bit JVM.

Error:Abnormal build process termination:
Error: This Java instance does not support a 32-bit JVM.
Please install the desired version.
How to fix it?
Java version:
$ java -version
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)
JAVA_HOME:
$ echo $JAVA_HOME
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
I also have JDK 1.8 installed...
In the general settings for your project, you need to specify the right SDK. You need to download the required java version, and then find the path to its home and then point to it in General Settings > Project > Project SDK. Likely, you need to upgrade to a newer version.

Sencha Cmd installation on Mac: Java not found

Trying to install Sencha Command 3.1.1 on my iMac (10.8.3). The installer is saying:
The installer could not find a valid Java(tm) on this machine.
Supported versions: Vendor : Any min. 1.6.0 max. any
Following another Stack Overflow thread, I tried linking /usr/bin/java to /Library/Internet Plugins/JavaAppletPlugin.plugin/Contents/Home/bin/java. Now, I get this on the command line:
~ 🍔 java -version
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b12)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
So that looks good, but the installer still complains that it cannot find Java. Why can't it?
What eventually fixed this for me, after consulting with Sencha support, was installing the full JDK rather than just the JRE. I don't know exactly why this fixed it, or what the root cause was, but now Command installed successfully and is working fine.
I had JDK installed, but one thing worked for me was exporting $java_home/bin:
export PATH=$JAVA_HOME/bin:$PATH

Categories

Resources