A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Arduino in Action
this week in the
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
Java in General
Executing a Jar file
Joined: Oct 08, 2008
Mar 03, 2010 06:34:33
I have a problem in running a
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"
Please assist me
Joined: Sep 19, 2008
Mar 03, 2010 07:37:51
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.
I agree. Here's the link:
subject: Executing a Jar file
Using a jar in classpath on command line
jar files - classNotFoundException
"jar cvf classes.jar classes.class" is not correct?
Jar manifest problem
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013