I am able to compile the java program but not able to run it.
The problem is that java cannot open the .cfg file which is part of JRE 8.
1 Answer
Firstly check if you have permission for running jar. Then check it your runtime is same as JDK.
Check if you are typing command correctly:
java -jar file.jar
Edit:
It seems like your .cfg file doesn’t exist or it’s corrupted.
Check it and try rebuild it. If it didn’t work you have syntax error somewhere int cfg file.

jvm.cfg?