Fehlermeldung Java Programm in CMD beheben?

2 Antworten

richtig, neueste runtime installieren und alles ist fein

Habe das gefunden :
My problem was that I had Java JDK 12 installed on my computerAt the same time, I had Java 8 (JRE) Installed on my computer.

So my computer is getting confused.

With my command prompt environment setup to run Java and Javac commands:

I typed the follow commands:

java -version  

// this gave me Java 8

After that, I typed:

javac -version

// this gave me Java 12

In other words, my program is getting compiled with Java 12 and I am trying to run with Java 8.

To solve the problem, I uninstalled Java 8 JRE from my computer.

Went back to command prompt to check if "java -version" and "javac -version" is returning the same version number, and yes, it is returning Java 12.

Tried recompiling my program again, and running it. It Worked!!

Vielleicht bei Dir das gleiche Problem.