Including jars in classpath on commandline (javac or apt)

前端 未结 6 1185
礼貌的吻别
礼貌的吻别 2020-11-22 05:44

trying to run this program. I think that to setup all of the web service stuff I need to run apt. (Although using javac I am having the same issue). I think what I am get

6条回答
  •  暖寄归人
    2020-11-22 06:16

    Try the following:

    java -cp jar1:jar2:jar3:dir1:. HelloWorld
    

    The default classpath (unless there is a CLASSPATH environment variable) is the current directory so if you redefine it, make sure you're adding the current directory (.) to the classpath as I have done.

提交回复
热议问题