How to resolve an error "A JNI error has occurred, please check your installation and try again" when you compile a java program?

I am new in learning Java. Trying to run "hello world!" An example of what I run is below.
class hello {

 public static void main(String args[]) {

 System.out.println("Hello, world!");



Javac compiles, but the generated class is not interpretiruya. I get the following error:
***:~/Documents/JavaSampl$ javac
***:~/Documents/JavaSampl$ java hello
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: hello has been compiled by a more recent version of the Java Runtime (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 53.0
 at java.lang.ClassLoader.defineClass1(java.base@9-internal/Native Method)
 at java.lang.ClassLoader.defineClass(java.base@9-internal/
 at jdk.internal.loader.BuiltinClassLoader.defineClass(java.base@9-internal/
 at jdk.internal.loader.BuiltinClassLoader.access$200(java.base@9-internal/
 at jdk.internal.loader.BuiltinClassLoader$
 at jdk.internal.loader.BuiltinClassLoader$
 at AccessController.doPrivileged(java.base@9-internal/Native Method)
 at jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(java.base@9-internal/
 at jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(java.base@9-internal/
 at jdk.internal.loader.BuiltinClassLoader.loadClass(java.base@9-internal/
 at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(java.base@9-internal/
 at java.lang.ClassLoader.loadClass(java.base@9-internal/
 at sun.launcher.LauncherHelper.loadMainClass(java.base@9-internal/
 at sun.launcher.LauncherHelper.checkAndLoadMain(java.base@9-internal/

Tell me how to solve it. Thanks in advance!
June 3rd 19 at 20:21
1 answer
June 3rd 19 at 20:23
Don't need to be a Pro in Java, enough to be able to use a translator
You compile with Java 10, and trying to run with Java 9.
Thank you, do in parallel jdk 10, jdk stood 9. The last one was deleted. Now everything is OK. - margarett.Powlows commented on June 3rd 19 at 20:26

Find more questions by tags Java