简体   繁体   中英

JDK 11 Install Issue

So i was trying to start Java, and download JDK 11. Also updated the JRE to the latest version. After installation and compiling my first "hello world" to " xxx.class ", trying to run it with:

java xxx

turned up an error of incompatible versions (the compiled file was v.55 while the JRE version only interpreted files up to version 52.)

So i unistalled JDK 11 and installed JDK 8. Now in my Java folder there is both a JDK.version_xxx and a JRE.version_xxx file, whereas when i installed JDK 11 there wasn't a JRE file installed (which i think was stated in the changes that happened in the new JDK 11 version).

Where and what JRE do i need to get to run files compiled with JDK 11?

JRE is no longer part of Java 11, as per JDK 11 Release Notes :

In this release, the JRE or Server JRE is no longer offered. Only the JDK is offered. Users can use jlink to create smaller custom runtimes.

Either compile against version of the target JRE or build a custom runtime with jlink .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM