Meaningless Drivel is fun!*
The moose likes Java in General and the fly likes  create this .jar gm.jar. and make it Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

create this .jar gm.jar. and make it

James Howerton
Ranch Hand

Joined: Mar 14, 2009
Posts: 82




I have another program 'Guitar Master'.I need to create this .jar gm.jar. and make it
executable.
then put this gm.jar inside the package of of 'Guitar Master' program. I have to be able to run the program when the client puts the disk in thier computer (not sure yet) I am having trouble understanding how to run any program outside of netbeans.

but if the program runs its first job is to take the gm.jar and put it on the clients
C:\ in the folder the program already creates. Also, it should create or put an icon on the
desktop so as to run the gm.jar .exe (pending).

The 'Guitar Master' program itself runs good. In need to install it.

[b]using the command line-not java[/b]
the command below deminstates that using the command line does almost the same
thing. It just creates a .jar of something ?? found in the program package and
creates and puts a gm.jar on the C:\ in the gmFolders dir as planned.

[b]this is the command and resultS:[/b]
[code][

C:\Program Files\Java\jdk1.6.0_11\bin>jar -cvmf C:\Users\depot\Documents\ceyesum
ma\java_cache\my_projects\guitar_master_project\target_guitar_master\guitar_mast
er\guitar_master\build\classes\view\myManifest.txt C:\Users\depot\.gmFolders\gm.
jar C:\Users\depot\Documents\ceyesumma\java_cache\my_projects\guitar_master_proj
ect\target_guitar_master\guitar_master\guitar_master\build\classes\view\Main.cla
ss
added manifest
adding: C:/Users/depot/Documents/ceyesumma/java_cache/my_projects/guitar_master_
project/target_guitar_master/guitar_master/guitar_master/build/classes/view/Main
.class(in = 944) (out= 584)(deflated 38%)

C:\Program Files\Java\jdk1.6.0_11\bin>jar -cvmf C:\Users\depot\Documents\ceyesum
ma\java_cache\my_projects\guitar_master_project\target_guitar_master\guitar_mast
er\guitar_master\build\classes\view\myManifest.txt C:\Users\depot\.gmFolders\gm.
jar C:\Users\depot\Documents\ceyesumma\java_cache\my_projects\guitar_master_proj
ect\target_guitar_master\guitar_master\guitar_master\build\classes\view\Main.cla
ss
[b]added manifest[/b]
adding: C:/Users/depot/Documents/ceyesumma/java_cache/my_projects/guitar_master_
project/target_guitar_master/guitar_master/guitar_master/build/classes/view/Main
.class(in = 944) (out= 584)(deflated 38%)

C:\Program Files\Java\jdk1.6.0_11\bin>
[/code]



Whether or not this is even close my main concern is that the jar created
is not executable it finds the myManifest.txt but can not load the attribute

[code]

Failed to load Main-Class.mnifest attribute from
C:\Users\depot\.gmFolders\gm.jar

[/code]

[b]the Main.class and the myManifest.txt are in the same folder[/b]
[code]
//////////

//////////
path to dest
//////////
C:\Users\depot\.gmFolders\gm.jar

//////////
path to myManifest.txt
////////////

C:\Users\depot\Documents\ceyesumma\java_cache\my_projects\guitar_master_project\target_guitar_master\guitar_master\guitar_master\build\classes\view\myManifest.txt

////////
path to classes
///////////
////
C:\Users\depot\Documents\ceyesumma\java_cache\my_projects\guitar_master_project\target_guitar_master\guitar_master\guitar_master\build\classes\view\Main.class

///////

[/code]

[b]myManifest.txt[/b]
[code]

Main-Class: Main
[/code]
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4523
    
    5

Cross post
http://www.daniweb.com/forums/thread303521.html

Split up into this thread and two others
http://www.coderanch.com/t/506840/java/java/moving-jar-sys-dir
http://www.coderanch.com/t/506837/java/java/make-jar-runnable


luck, db
There are no new questions, but there may be new answers.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: create this .jar gm.jar. and make it
 
Similar Threads
Java applet won't display in firefox
executing jar file
Problem with an applet
loadFromXML(fis)
make .jar runnable