The problem is the following, my jar file is launched into a friend on the laptop, but I do not. The jdk version is the same. When I run via cmd I get

 Error: Could not find or load main class Main Caused by: java.lang.ClassNotFoundException: Main 

What could be the problem? If you create a non-JavaFX project but simply Java then everything is ok.

  • What command do you run the jar file? The JDK version does not affect the launch of JAR files, the JVM is responsible for their launch. - Vladimir Yarovoy
  • I launch the jar through a double click, in cmd java -jar a.jar - ivff
  • Try running like this: "java -cp a.jar Main", you should read about ClassPath and launching an application that does not have packages. To launch such an application, you need to create a manifest.txt file with three lines: "Manifest-Version: 1.0", "Class-Path:.", "Main-Class: Main" - Vladimir Yarovoy
  • Nothing has changed - ivff
  • And the file path? I know it happens when a certain "Andrew" appears in a Cyrillic alphabet on the way to the file - Serhii Dikobrazko

0