Create,extract and see the contents of the JAR in Commnad Prompt

1)Create the jar file:

go the specific directory in which  .class files are there and the below command

jar cvf myproject.jar .

2) Extract the contents of the jar file

jar xvf myproject.jar 

3) To see the  contents of the jar file

jar tvf myproject.jar 

4) To know more about the jar options enter the below commnad

jar -help

5) To install the executable jar file

jar -jar sample.jar

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s