Important alert: (current site time 7/15/2013 2:25:47 PM EDT)
 

article

How to make executable jar. in JDK1.3.1

Email
Submitted on: 7/9/2002 10:53:12 AM
By: Bhushan-  
Level: Intermediate
User Rating: By 16 Users
Compatibility: Java (JDK 1.2)
Views: 66783
author picture
(About the author)
 
     Creting executable jar. in JDK1.3.1.

 
 
Terms of Agreement:   
By using this article, you agree to the following terms...   
  1. You may use this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this article from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
				




New Page 1


 

How to make executable jar files in JDK1.3.1?,
I can make jar in JDK 1.3.1 but when I developed a package in java(application) I was Unable to make executable jar.?


Instructions for creating an Excecutable .jar file


Make or modify the Manifest.MF to YourManifest.MF.
1) YourClassNameWithMain is the class name (case sensitive)without .class extention
2) No extra spaces following the YourClassName withMain.

Manifest-Version:1.0
Main-Class: YourClassNameWithMain
Created-by:1.2(Sun Microsystems Inc.)
On Command line : type the following
jar cvfm YourJarFileName.jar YourManifest.MF*
or
jar cvfm YourJarFileName.jar YourManifest.MF -C classes yourClassPath
Drag-drop the YourJarFileName.jar to your desktop double click it, it runs
If your program only has System.out.println ("whatever"); statements, it will
display nothing. The same will happen when you run it useing java at command line 
You need some windows code to see it run
Instructions for creating a .jar file
jar utility comes with your JDK1.2.2 It compresses your
file similar to zip utility, and more Java.
You can use it on any machine installed JDK
Create a folder name it anything
Make that folder your current directory
put all your files for turning in (do not put any extra)
in that directory.
Be sure to put your html file, if there is one
At your dos prompt, while you are in the directory that you created , type in:
jar cvf Prj02.jar*
This will take ALL the files in the directory including 
subdirectories and place them in a .jar file Prj02 that can be
replaced by any of your desired jar file name.
To test it, you can extract the contents of jar file by typing:
jar xvf Prj02.jar


Some user posted Query is on this location in my codes so this is answer.

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=3035&lngWId=2



Other 14 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this article (in the Intermediate category)?
(The article with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular article, please click here instead.)
 

To post feedback, first please login.