Setting classpath for a JAR

前端 未结 2 1081
不知归路
不知归路 2020-12-21 13:39

I have a standalone java project. I have performed a maven clean install. I now go into the target\\classes folder via command prompt and set all the required files in class

2条回答
  •  猫巷女王i
    2020-12-21 14:12

    It seems -cp and -jar are incompatible. You need to put the classpath in the manifest

    See http://docs.oracle.com/javase/tutorial/deployment/jar/downman.html

    If you want maven to automatically update the classpath, see: -

    http://maven.apache.org/shared/maven-archiver/examples/classpath.html

提交回复
热议问题