This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread 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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 4523
    
    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
 
Similar Threads
I Need jar files for swing components.
javax.comm
make a jar file from source code in Netbeans
How do I use a library packaged as a jar file in NetBeans
Run JAR file in Applet