| Author |
Executing a Jar file
|
Meet Gaurav
Ranch Hand
Joined: Oct 08, 2008
Posts: 492
|
|
Hi
I have a problem in running a java class which is present inside a jar.
I just compiled the classes to bin folder and created a jar using “jar cvf test.jar -C bin .”. Everything is success until this step. After that I tried executing “java -cp test.jar EnvTest”
NOTE: Class EnvTest has a main method. I don't want executable jar.
Am getting below error. Please assist me.
Exception in thread "main" java.lang.NoClassDefFoundError: EnvTest
Please assist me
|
 |
Siva Masilamani
Ranch Hand
Joined: Sep 19, 2008
Posts: 377
|
|
|
You have to give the fully qualified name if the class is in package.
|
SCJP 6,SCWCD 5,SCBCD 5
Failure is not an option.
|
 |
 |
|
|
subject: Executing a Jar file
|
|
|