triadaib.blogg.se

Mac check java version
Mac check java version











$ cd /usr/lib/jvm/adoptopenjdk-11-hotspot-amd64/bin/

mac check java version

etc/alternatives/javac -> /usr/lib/jvm/adoptopenjdk-11-hotspot-amd64/bin/javac usr/bin/javac -> /etc/alternatives/javac On Ubuntu or Linux system, we can use which javac to find out where JDK is installed: $ which javac Multiple JDK and JRE versions are allowed on the same computer it is better to find out which version is configured in the system classpath to run or compile the Java program. The JDK and JRE versions can be different on the same computer. OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode) In the below example, the JRE version is 1.8.0_252: $ java -version Similarly, we can use java -version to find out the version of the installed JRE. In the below example, the JDK version is 11.0.7: $ javac -version Check JDK VersionĪ common way to check JDK version is by using the following simple command to find out the version of the installed JDK. class to machine code, and execute it, in short, the JRE runs Java program.

mac check java version

The Java development kit (JDK) contains tools for Java development, and the Java Runtime Environment (JRE) contains a JVM to convert byte code.

#Mac check java version install

However, developers often request to install the JDK, instead of the standalone JRE on the production server, because the JDK contains JRE and also extra tools to monitor and debug the running Java program. For the production environment, the deployment team only need to install JRE to run the Java program. Firts of all, for end-users, they need to install JRE to run the Java program, and the JDK is for developers.











Mac check java version