I followed https://www.guru99.com/how-to-install-java-on-ubuntu.html to install Java on my 64-bit, x86, Ubuntu 18.04 system.
When I run "java -version", I get the output :
ariba#monster:~$ java -version
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) Server VM (build 25.231-b11, mixed mode)
What does "Java HotSpot(TM) Server VM (build 25.231-b11, mixed mode)" mean? Is my JVM architecture 64-bit or 32-bit ? And what architecture of eclipse-installer should I use, then?
The Java HotSpot Virtual Machine is a core component of the Java SE platform. It implements the Java Virtual Machine Specification, and is delivered as a shared library in the Java Runtime Environment. So, HotSpot is an "ergonomic" JVM. Read more detail here, link.
JVM architecture which you post in the question is 32-bit. You can get 64-Bit info in the output if you JDK is 64-bit architecture.
λ java -version
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
Just getting the latest 64-bit version eclipse. The architecture of eclipse-installer depends on your system architecture.
Related
On checking with java -version get the output as
openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)
Wants to ensure this openjdk binary is from oracle or redhat.
While checking on JMX VM Summary page it shows the Vendor name as "Oracle Corporation". Does this mean its oracle provided openjdk distribution ?
What should be the vendor name for RedHat OpenJDK distribution ?
In general, java -version from Oracle's builds say
java version ...
Instead of
openjdk version ....
The java.vendor system property, unfortunately, has compatibility issues. It can't be changed without (potentially) breaking users.
For example, changing that property from Sun to Oracle once broke eclipse: https://it.slashdot.org/story/10/07/28/2121259/oracles-java-company-change-breaks-eclipse
So OpenJDK distributors are very very cautious about changing these vendor properties. Pretty much everyone will stick to the default values for pretty much all the system properties.
If you have installed OpenJDK on RHEL and you are using the java-*-openjdk packages, those have been built and are being maintained by Red Hat. You can find out what package that is by using rpm:
rpm -qf $(readlink -f $(which java))
If you see java-1.8.0-openjdk-headless, that's the package maintained by Red Hat.
openjdk is from oracle. i think the redhat just put binaries of openjdk in their repository. so the vendorname is oracle.
Oracle jdk is named as Hotspot
$ java -version
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
Non-oracle jdk
$ java -version
openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)
Using java -version gives me this.
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
Is it an OpenJDK or OracleJDK ?
I think that you're using OracleJDK.
As I saw with a google search, the openJDK --version output is like this:
java -version
openjdk version "1.8.0-internal"
OpenJDK Runtime Environment (build 1.8.0-internal-0)
OpenJDK 64-Bit Zero VM (build 25.0-b20-internal, interpreted mode)
See: http://mail.openjdk.java.net/pipermail/jdk8-dev/2013-July/002840.html
On debian, jessie-backports, openjdk-8:
openjdk version "1.8.0_66-internal"
OpenJDK Runtime Environment (build 1.8.0_66-internal-b17)
OpenJDK 64-Bit Server VM (build 25.66-b17, mixed mode)
Using the ubuntu ppa for oracle-java-8:
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
I would assume, the string "java" at the beginning denotes Oracle Java, whereas the OpenJDK gets you "openjdk".
Call sun.misc.Version#println in java code will dump the version info to stderr. If you want to fetch the JDK version from java code.
package bj.tmp;
import sun.misc.Version;
public class Foo {
public static void main(String[] args) {
Version.println();
}
}
Like this:
java version "1.8.0_192"
Java(TM) SE Runtime Environment (build 1.8.0_192-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.192-b12, mixed mode)
Based on actual test I did on my system by using Oracle JDK and OpenJDK:
Option 1
You can execute the java –version command and in the case of OpenJDK you will clearly see “openjdk” in the output while in case of Oracle JDK you will se “Hotspot” in the output. That's how you can differentiate.
Below is actual from my system:
C:\Users\himanshu.agrawal>"C:\E_Drive\Softwares\OpenJDK-java-se-7u75-ri\jre\bin\java" -version
openjdk version "1.7.0_75"
OpenJDK Runtime Environment (build 1.7.0_75-b13)
OpenJDK Client VM (build 24.75-b04, mixed mode)
C:\Users\himanshu.agrawal>java -version
java version "1.8.0_301"
Java(TM) SE Runtime Environment (build 1.8.0_301-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.301-b09, mixed mode)
Option 2
You can use java.vm.name or java.runtime.name system property.
I think since Oracle is still the key contributor / responsible for the OpenJDK project so if you use java.vm.vendor or java.specification.vendor you still get Oracle as the vendor.
Below actual output from my system for these properties:
// when using OpenJDK
java.vm.name = OpenJDK 64-Bit Server VM
java.runtime.name = OpenJDK Runtime Environment
java.vm.vendor = "Oracle Corporation"
java.specification.vendor = Oracle Corporation
// when using Oracle JDK
java.vm.name = Java HotSpot(TM) 64-Bit Server VM
java.runtime.name = Java(TM) SE Runtime Environment
java.vm.vendor = Oracle Corporation
java.specification.vendor = Oracle Corporation
Is Oracle Hotspot JVM is same as what we can download from http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html ?
If not from where we can downlaod Java Hotspot JVM.
The link is HotSpot JVM
You can download it and check with
java-version
and will find like
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
I have a JNLP application which fails with the following error:
Cannot find JNIWrapper native library (jniwrap64.dll) in java.library.path: ....
I have Java 8 64bit installed and using IE11.
Any help on how to fix it will be appreciated.
Just to clarify: I did not write the application and only trying to run it.
You need 32bit java version to launch the JNLP application and not 64bit java
please run below command to check what version of java you are running
C:\RIM\SINGTEL\950_0\inproc>java -d64 -version
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
I'm trying to install Netbeans 8 but the installer is not finding JDK.
But, I can't update my Java, I installed the update 51 of java 7 but when I go in terminal I get it:
Alessandros-MacBook:~ alessandrogarcez$ java -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 "System preferences", I have version 7 installed.
It seems to have both version of java installed in my mac.
Someone can help me to solve it?
Thanks
I was trying to install jre-7u45-macosx-x64.dmg and I don't know why it doesn't overwrite java 6.
I've read a lot of topics, tried all of them.
http://support.apple.com/kb/DL1572?viewlocale=en_US
http://www.cc.gatech.edu/~simpkins/teaching/gatech/cs2340/guides/java7-macosx.html
After all of it, I just downloaded jdk-7u51-macosx-x64.dmg and it worked. The version 7 overwrited the 6.
Alessandros-MacBook:~ alessandrogarcez$ java -version
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)