Cannot start the JAR file on another PC. Possible problem with environment variables?

I created a JAR file and it works fine on my PC (XP) on which Eclipse is installed. It also works on another PC that also has Eclipse.

I tried running it on another PC (XP) that does not have Eclipse. Although it contains JDK and several JREs. The JAR file simply does not execute by clicking or from the command line.

I'm not quite sure, but as I understand it, environment variables are not set properly. Here is the error I get on the command line:

Exception in thread "main" java.lang.NoClassDefFoundError: ...

Any help would be appreciated.

+3
source share
3 answers

, , .

, , , . ,

  • jar
  • Zip jar - jar-in-jar-loader.jar jar.
  • .

, , , . , , JDK, . , .

: eclipse? , / / , eclipse ( java , ). , ANT script eclipse, eclipse ANT script -, .

+3

CLASSPATH.

, . , , . jar env classpath.

+4

jar ( javaw -jar your.jar).

, Eclipse.

0

Source: https://habr.com/ru/post/1762904/


All Articles