--!> Game & GBA, Anime, Dorama, J-Music, Hikago, and Me :: Bikin Jar File Cara Susah :: May :: 2007

Game & GBA, Anime, Dorama, J-Music, Hikago, and Me

Custom Search
Dragonadopters

May 21, 2007

Bikin Jar File Cara Susah

Filed under: Java

Titipan untuk Fahim… Cowok terkeren di TC 05

Below are the detailed steps for doing this in Command Prompt and in JCreator.

Creating a jar File in JCreator

You can configure a “tool” that will automate the jar creation process.  You only need to do it once.
  1. Click on Configure/Options.
  2. Click on Tools in the left column.
  3. Click New, and choose Create Jar file.
  4. Click on the newly created entry Create Jar File in the left column under Tools.
  5. Edit the middle line labeled Arguments: it should have
    cvfm $[PrjName].jar manifest.txt *.class
  6. Click OK.

Now set up a project for your program, create a manifest file manifest.txt or copy and edit an existing one.  Place manifest.txt in the same folder where the .class files go.  Under View/Toolbars check the Tools toolbar.  Click on the corresponding tool button or press Ctrl-1 (or Ctrl-n if this is the n-th tool) to run the Create Jar&nbspFile tool.

With Windows Explorer, go to the jar file that you just created and double click on it to run.

Creating a jar File in Command Prompt

  1. Start Command Prompt.
  2. Navigate to the folder that holds your class files:
    C:\>cd \mywork
  3. Set path to include JDK’s bin.  For example:
    C:\mywork> path c:\Program Files\Java\jdk1.5.0_09\bin;%path%
  4. Compile your class(es):
    C:\mywork> javac *.java
  5. Create a manifest file:
    C:\mywork> echo Main-Class: DanceStudio >manifest.txt
  6. Create a jar file:
    C:\mywork> jar cvfm DanceStudio.jar manifest.txt *.class
  7. Test your jar:
    C:\mywork> DanceStudio.jar

Skylight Publishing
support@skylit.com

(NB : ini dibuat oleh yang tersebut di atas dan dicomot dari http://www.skylit.com/javamethods/faqs/createjar.html)

Angry Werewolf

Powered by ScribeFire.

Comments »

The URI to TrackBack this entry is: http://echohikaru.blogsome.com/2007/05/21/bikin-jar-file-cara-susah/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.

Get free blog up and running in minutes with Blogsome
Theme designed by Minz Meyer