Today in the CMD environment
java Helloworld.java
javac Helloworld
If it doesn’t work, it shows up
Exception in thread "main" java.lang.UnsupportedClassVersionError: helloworld has been compiled by a more recent version of the Java Runtime (class file version 57.0), this version of the Java Runtime only recognizes class file versions up to 52.0
Error message.
after thinking about it, I probably made a java8 environment by playing mine craft before. Later, I downloaded and installed jdk13 for development, which caused the problems caused by the difference between javac and Java version.
then reset JAVA_HOME to C:\Program Files\Java\jdk-13
should be solved.
when something weird happens, still report this error. In a rage, I deleted
and reported an error after I deleted
directory which caused the conflict
Error: could not open `C:\Program Files\Java\jre1.8.0_201\lib\amd64\jvm.cfg
The problem should be clear, because I don’t know which environment variable is still pointing to this folder, I find the same problem in stackoverflow, where Jason Hughes mentioned that this guideline exists in C:\Program Files\Common Files\oracle\
folder, (my word is C:\Program Files(x86)\Common Files\oracle\
), delete the directory directly and restart once it comes.
problem solved.
Read More:
- A JNI error has occurred, please check your installation and try again
- Java command line uses a JNI error has occurred, please check your installation and try again
- error:could not open…jvm.cfg solution
- Error: could not open `C:\Program Files\Java\jre1.8.0_211\lib\amd64\jvm.cfg’ (How to Fix)
- Start Eclipse and pop up the “Failed to load the JNI shared library jvm.dll” dialog box
- Eclipse run main method error: a JNI error has occurred, please check your installation and try again
- Eclipse reports Failed to load the JNI shared library jvm.dll error solution
- Error: a JNI error has occurred
- Idea for Mac setting JVM running parameters to solve running stuck problem
- Failed to create JVM. JVM Path: xxxxx
- Install apache2.4 on windows to solve the problem of the requested operation has failed
- Solve the problem of jdk8 after win7 is installed. Has value ‘1.8’, but ‘1.7’ is required
- Idea startup prompt failed to create jvm: error code -1 jvm path solution
- Solution to failed to create JVM: error code – 1 JVM path
- Error: missing `server’ JVM at `C:\Program Files (x86)\Java\jre1.8.0_231\bin\server\jvm.dll’.
- Solve the problem that TeamViewer software prompts that the trial period has expired and cannot be operated remotely
- Solve the problem of “A TimThumb error has occured” in the WordPress program
- Error running Eclipse: failed to load the JNI shared library
- could not open `C:\Program Files\Java\jre1.8.0_191\lib\amd64\jvm.cfg’
- Solve the problem of attributeerror: module ‘SciPy’ has no attribute ‘Stats’