Skip to main content

Thread: how specific class into jar


hello,

i'm losing lot of time success little , basic problem.
context:

developing application using specific .jar path/jdk/lib

classpath not fixed..
i've seen -classpath option incompatible -jar option (i.e. manifest..)

solution not abble success it..

want access main.class , add path/jdk/lib in -classpath , not use -jar option.

in practice, :
java -cp ./lib:/path/to/jdk/lib/tools.jar my.main.class

suppose in directory .jar , lib directory.

: java.lang.noclassdeffounderror: my.main.class

miss ?

can more specific , give exact filenames , pathnames using , working in anf actual comman line.

1 thing may effecting you don't put .class extension of main class in java line.

code:
    java -cp ./lib:/path/to/jdk/lib/tools.jar my.main
also directory of class file must match class path, given ./lib in classpath, main class file should ./lib/my/main.class


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk how specific class into jar


Ubuntu

Comments

Popular posts from this blog

Warning, the Safe Path is not accessible vm3 - Joomla! Forum - community, help and support

uppercase letters in url - Joomla! Forum - community, help and support

Joomla! Update is not offering Joomla 3 - Joomla! Forum - community, help and support