How to create jar file, executable jar file through command prompt:
How to create jar file, executable jar file through command prompt:
C:\Documents and Settings\madhusudhanrc\
C:\Documents and Settings\madhusudhanrc\
C:\Documents and Settings\madhusudhanrc\
Desktop>java OverriddenSample
Yahooo
C:\Documents and Settings\madhusudhanrc\
Desktop>jar cf test.jar OverriddenSample
.class
C:\Documents and Settings\madhusudhanrc\
Desktop>java -jar test.jar
(Error) no main manifest attribute, in test.jar
To avoid that error :
create abc.txt file
Main-class: OverriddenSample (and give enter)
Now save the file
C:\Documents and Settings\madhusudhanrc\
Desktop>jar cfm test.jar abc.txt Overrid
denSample.class
C:\Documents and Settings\madhusudhanrc\
Desktop>java -jar test.jar
Yahooo
Comments
Post a Comment
Please post comments here:-)