posted 14 years ago
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]