Additional jar files for java.exe -jar -



Additional jar files for java.exe -jar -

i run next command:

c:\projects\java -cp ./dependency.jar -jar ./dist/main.jar exception in thread "main" java.lang.noclassdeffounderror: myexception caused by: java.lang.classnotfoundexception: myexception @ java.net.urlclassloader$1.run(unknown source) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(unknown source) @ java.lang.classloader.loadclass(unknown source) @ sun.misc.launcher$appclassloader.loadclass(unknown source) @ java.lang.classloader.loadclass(unknown source) not find main class: main. programme exit.

myexception within dependency.jar. tried replace -cp -classpath. do wrong?

the -cp options ignored if utilize -jar. if need jar-files on class-path, should specify in manifest of main.jar this:

class-path: dependency.jar

(then can run programme using java -jar main.jar.)

related questions:

when creating jar file how retain existing classpaths other jar files? cannot find class when jar file in working directory jetty classpath issues problem related manifest.mf in jar

java jar

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -