I can't launch any .jar program since Java doesn't find the main class. This is true for ANY program not just my self written. So it isn't just a faulty manifest that is causing it. I have tried to just reinstall the Java runtime and JDK and also I have checked the PATH environment variables. Java Runtime Version is "1.8.0_251" and JDK is "11.0.7". Another Error I am seeming to get is an java.lang.UnsatisfiedLinkError
I am trying to launch it via. "Java -jar C:...\Programname.jar" in the command prompt.
EDIT: So it is not applicable to any program. For example: This is one of the programs that are working like intended: http://www.softsea.com/download/Simple-Java-Calculator.html However Programs like these ones are producing the errors mentioned: https://sourceforge.net/projects/java-calculator/ http://www.java2s.com/Code/Jar/j/Downloadjavacalculator100rc20jar.htm
EDIT2: I had also an OpenJDK installed which seemed to cause a conflict. I saw that the Path Variable of the OpenJDK got prioritized. Basically I have had different versions for java and the java compiler, even though they shared the same version number. This is at least my interpretation of the problem. For further judgment I am lacking experience with java and lacking depper knowledge about the processes in question. After I changed this my own programs are working at least. The example programs still do not work. I expect a problem on their side or some still underlying problem I am unable to identify. When trying to find working programs to test if your Java is working, I will definitely not choose random google results for "basic calculator java" next time.
I am thankful for your help, time and patience and I am sorry for any inconveniences I may have caused you trying to help me find the solution to my problem.
For example, PATH C:\Java\jdk1.8.0_191\bin Please use the version of your JDK in my case the jdk version is 1.80_191. It must match with the similar folder location
In the system variable section add new variable with name variable name: JAVA_HOME variable value: C:\Java\jdk1.8.0_191\lib
You must restart your computer after making changes to the environmental variables which is important.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments