This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
    Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

create this .jar gm.jar. and make it

 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator




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]
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Cross post
http://www.daniweb.com/forums/thread303521.html

Split up into this thread and two others
https://coderanch.com/t/506840/java/java/moving-jar-sys-dir
https://coderanch.com/t/506837/java/java/make-jar-runnable
 
Switching from electric heat to a rocket mass heater reduces your carbon footprint as much as parking 7 cars. Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
    Bookmark Topic Watch Topic
  • New Topic