File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 4541
    
    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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to pack everything within jar file in netbeans