Mu Alpha Theta
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Making a JAR file

3 posters

Go down

Making a JAR file Empty Making a JAR file

Post by Michael 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
Michael
Michael
Graduated member
Graduated member

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

http://elkinschess.forummotion.com

Back to top Go down

Making a JAR file Empty Re: Making a JAR file

Post by Chii 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

Back to top Go down

Making a JAR file Empty Re: Making a JAR file

Post by Michael 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.
Michael
Michael
Graduated member
Graduated member

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

http://elkinschess.forummotion.com

Back to top Go down

Making a JAR file Empty Re: Making a JAR file

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

whats this for again?
Nameless
Nameless
Member
Member

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

Back to top Go down

Making a JAR file Empty Re: Making a JAR file

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

a jar file encloses .class files in an executable archive.
Michael
Michael
Graduated member
Graduated member

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

http://elkinschess.forummotion.com

Back to top Go down

Making a JAR file Empty Re: Making a JAR file

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

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

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

Back to top Go down

Making a JAR file Empty Re: Making a JAR file

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


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