Making a JAR file

Go down

Making a JAR file

Post by Michael on Thu May 29, 2008 12:38 pm

1. Copy the .class files into the same folder as jar.exe (search for jar.exe to find it)
If the .class files are in a package, copy the folder with the .class files of the package, not the individual class files.

2. make two text files, "mainClass.txt" and "manifest.txt". In each file, put the text "Main-Class: " + your main class name (including package if applicable). Then press Enter to make a new line.

3. In cmd prompt, navigate to the folder with your .class files and jar.exe. Use cd foldername

4. Type (in cmd prompt) the following: "jar.exe cvfm JarName.jar manifest.txt mainClass.txt *.class"
If you have package classes in a folder, type "FolderName/*.class"

5. Type "JarName.jar" to test your jar file.


Last edited by Michael on Thu Oct 16, 2008 4:17 pm; edited 1 time in total
avatar
Michael
Graduated member
Graduated member

Male Number of posts : 151
Age : 27
Registration date : 2008-04-30

View user profile http://elkinschess.forummotion.com

Back to top Go down

Re: Making a JAR file

Post by Chii on Thu Jun 19, 2008 9:24 pm

Thanks. Came in handy for some of my programs at home @@;

Also you need to run it under administrator on Vista Computers

Chii
Graduated member
Graduated member

Number of posts : 1
Registration date : 2008-05-01

View user profile

Back to top Go down

Re: Making a JAR file

Post by Michael on Sun Jun 22, 2008 9:05 pm

Chii wrote:Also you need to run it under administrator on Vista Computers
I do it all the time, and I'm not admin...although you might need admin permission to see the files in the Program Files folder.
avatar
Michael
Graduated member
Graduated member

Male Number of posts : 151
Age : 27
Registration date : 2008-04-30

View user profile http://elkinschess.forummotion.com

Back to top Go down

Re: Making a JAR file

Post by Nameless on Sat Sep 20, 2008 4:32 pm

whats this for again?
avatar
Nameless
Member
Member

Male Number of posts : 247
Location : Unknown, but with known acceleration and direction
Registration date : 2008-08-31

View user profile

Back to top Go down

Re: Making a JAR file

Post by Michael on Sat Sep 20, 2008 9:58 pm

a jar file encloses .class files in an executable archive.

_________________
Webmaster 08-09

Elkins Chess Club Website
avatar
Michael
Graduated member
Graduated member

Male Number of posts : 151
Age : 27
Registration date : 2008-04-30

View user profile http://elkinschess.forummotion.com

Back to top Go down

Re: Making a JAR file

Post by Nameless on Sat Sep 20, 2008 11:16 pm

Ohhh do i learn this in CS1?
avatar
Nameless
Member
Member

Male Number of posts : 247
Location : Unknown, but with known acceleration and direction
Registration date : 2008-08-31

View user profile

Back to top Go down

Re: Making a JAR file

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum