How to set CLASSPATH in Linux to let java find jar file?

后端 未结 4 948
误落风尘
误落风尘 2021-01-07 14:40

Under Linux I am trying to run a jar file as follows:

java -jar plantuml.jar -testdot

while having CLASSPATH set to any of th

4条回答
  •  忘掉有多难
    2021-01-07 15:35

    Maybe you are missing name of the main class or path to the jar. Have you tried execute it:

    java -jar full_path/plantuml.jar package.YourClass -testdot
    

    Is your program depending on other classes? If yes you might want to add -cp parameter.

提交回复
热议问题