Setting classpath for a JAR

前端 未结 2 1080
不知归路
不知归路 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条回答
  •  心在旅途
    2020-12-21 14:26

    When you use -jar this is the sole mechanism setting the classpath for the program.

    You must either have all the jars you need listed in the Class-Path line in the manifest (which implies they need to be findable in the local file system) or create a custom class loader capable of locating the jar you need.

提交回复
热议问题