This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes IDEs, Version Control and other tools and the fly likes how to pack everything within jar file in netbeans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "how to pack everything within jar file in netbeans" Watch "how to pack everything within jar file in netbeans" New topic
Author

how to pack everything within jar file in netbeans

Sanjeev Charla
Ranch Hand

Joined: Apr 02, 2009
Posts: 90

how to make a single unique jar file with all related resources ( icons, images etc) contains in itself, in netbeans ??

thank you.
Ifteqar Ahmed
Ranch Hand

Joined: May 02, 2011
Posts: 85

Hi sandeep, NetBeans automatically creates the war file. you dont have to do anything. just open your project space folder and you will find one jar file. The only thing you have to do is just build the project in Netbeans
Sanjeev Charla
Ranch Hand

Joined: Apr 02, 2009
Posts: 90



for a code like the above, i have to place a folder images/ and place icon.png in this folder at the jar file's location, like this.

----->dist/
----->dist/MyApplication.jar
----->dist/images/
----->dist/images/icon.png


but i want to move the images folder in to the jar file. for that how i have to code ??



Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4530
    
    5

A resource in a jar file is not itself a file. Please go through the Swing tutorial on How to Use Icons and particularly the section on Loading Images Using getResource.


luck, db
There are no new questions, but there may be new answers.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to pack everything within jar file in netbeans