Create Jar

Published on March 2021 | Categories: Documents | Downloads: 0 | Comments: 0 | Views: 87
of x
Download PDF   Embed   Report

Comments

Content

 

jar cfm test.jar stc.manifest .\ymsg

Java Archive (JAR) files allow developers to package many classes into a single file. JAR files also use compression, so this can make applets and applications smaller. Creating a .JAR file is easy. Simple go to the directory your classes are stored  in and type :jar -cf myfile.jar *.class If application or applet uses packages, you'll need to do things a lit tleyour differently. Suppose your classes were inthen the package mycode.games.CoolGame - you'd change to the directory above mycode and type the following :- (Remember  to use / on UNIX systems) jar -cf myfile.jar .\mycode\games\CoolGame\*.class .\mycode\games\CoolGame\*.class Now, if you have an existing JAR file, and want to extract it, you'd type the fo llowing jar -xf myfile.jar Working with JAR files isn't that difficult, especially if you've used the unix 'tar' command before. If you're planning on packaging an applet for Internet Ex plorer, or an application for Microsoft's jview, you might also want to consider  .CAB files.

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close