Getting a java.lang.ClassNotFoundException even though i've specified the correct jar with -cp

前端 未结 2 1600
悲哀的现实
悲哀的现实 2020-12-11 19:54

java.lang.ClassNotFoundException: com.hazelcast.core.Hazelcast

This bit is strange though, because i\'ve added hazelcast-1.8.5.jar to the classpath when i\'m running

相关标签:
2条回答
  • 2020-12-11 20:32

    You need to set ClassPath in the JAR manifest.

    0 讨论(0)
  • 2020-12-11 20:47

    From the -jar option docs:
    When you use this option, the JAR file is the source of all user classes, and other user class path settings are ignored.

    0 讨论(0)
提交回复
热议问题