This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes NetBeans IDE : Executable Jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "NetBeans IDE : Executable Jar" Watch "NetBeans IDE : Executable Jar" New topic
Author

NetBeans IDE : Executable Jar

Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

Hi Author,

How do I include the other libraries and .vm (velocity template) files in my executable jar. (the one which creates automatically by NetBeans is created the lib folder inside dist and place all my libraries into lib folder).

one way I know to create by this command by including the jar files into manifest file.


Main-Class: Main
Class-Path: mylib.jar




is there any way in netbeans to achieve this?

Thanks for reading my post.


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
Gagan Indus
Ranch Hand

Joined: Feb 28, 2001
Posts: 346
Yes absolutely, just add the *.vm to your project's "Source" folder, and any dependency jars to your project's "Library" folder and Netbeans will make sure while packaging these becomes part of the jar file. Thats the simplest way.


Also, if you use Maven for builds you can have Maven do this packaging the way you want and just tell netbeans where to find the Maven POM file.


Gagan (/^_^\) SCJP2 SCWCD IBM486 <br />Die-hard JavaMonk -- little Java a day, keeps you going.<br /><a href="http://www.objectfirst.com/blog" target="_blank" rel="nofollow">My Blog</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NetBeans IDE : Executable Jar
 
Similar Threads
I created an executable jar file when i execute it i am getting errors
Jar Files: Kill me NOW.
Problem running an executable jar
Creating .exe from class file
JVM: Could not find the main class. Program will exit