Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How to create executable jar in NetBeans IDE

Reply
Thread Tools

How to create executable jar in NetBeans IDE

 
 
semi
Guest
Posts: n/a
 
      02-25-2005
I used to use Jbuilder for JAVA development. In Jbuilder, I was able
to create executabe jar that has all the libraries in and run on its
own. How do you create same kind of executable jar with NetBeans?

Thanks in advance,

Seung

 
Reply With Quote
 
 
 
 
Karel Suikers
Guest
Posts: n/a
 
      02-25-2005
> I used to use Jbuilder for JAVA development. In Jbuilder, I was able
> to create executabe jar that has all the libraries in and run on its
> own. How do you create same kind of executable jar with NetBeans?


I do it with an ant script. I hope someone can tell me how to do it with
three mouseclicks...
 
Reply With Quote
 
 
 
 
Oscar kind
Guest
Posts: n/a
 
      02-25-2005
Karel Suikers <> wrote:
>> I used to use Jbuilder for JAVA development. In Jbuilder, I was able
>> to create executabe jar that has all the libraries in and run on its
>> own. How do you create same kind of executable jar with NetBeans?

>
> I do it with an ant script. I hope someone can tell me how to do it with
> three mouseclicks...


In my IDE, I use two mouse clicks (sorry, not three). These mouse clicks
start ANT using a similar build script.

Many IDE's provide ANT support these days, of which JBuilder is one
(IIRC). I know for certain that Eclipse and IntelliJ do.


--
Oscar Kind http://home.hccnet.nl/okind/
Software Developer for contact information, see website

PGP Key fingerprint: 91F3 6C72 F465 5E98 C246 61D9 2C32 8E24 097B B4E2
 
Reply With Quote
 
Ferenc Hechler
Guest
Posts: n/a
 
      02-26-2005

"Oscar kind" <> schrieb im Newsbeitrag
newsfh4f2-...
> Karel Suikers <> wrote:
>>> I used to use Jbuilder for JAVA development. In Jbuilder, I was able
>>> to create executabe jar that has all the libraries in and run on its
>>> own. How do you create same kind of executable jar with NetBeans?

>>
>> I do it with an ant script. I hope someone can tell me how to do it with
>> three mouseclicks...

>
> In my IDE, I use two mouse clicks (sorry, not three). These mouse clicks
> start ANT using a similar build script.
>
> Many IDE's provide ANT support these days, of which JBuilder is one
> (IIRC). I know for certain that Eclipse and IntelliJ do.
>


In Eclipse you can use the Fat-Jar Eclipse Plug-In
http://fjep.sourceforge.net .
This plugin allows building an executable jar file containing all referenced
jars,
classes and subproject. The information is gathered from the project
classpath.
After you have configured and saved the settings for a project (Main-Class.
....),
you can rebuild the "Fat-Jar" with one mouse-click: Right-Click on the
settings -> Fat-Jar -> Quick-Build
Also you can export the current settings as an ANT script.

Best regards,

feri


 
Reply With Quote
 
tha_specializt tha_specializt is offline
Junior Member
Join Date: Dec 2007
Posts: 2
 
      12-20-2007
Why use a Eclipse if you can use a well-suited, fast and optimized out-of-the-box-IDE?
Easy as pie: (Netbeans 5.5)

right-click your project,
"set main project",
select your project,
"File",
"PROJECTNAME Properties",
"Run",
set your main class,
"Libraries",
"Add JAR/Folder",
select your wanted libs,
do a CLEAN build,
enter the build-path,
enter /dist and be amazed --> DONE!

No Modifications/Hacks/buggy DiY-IDE´s, no cry
 
Reply With Quote
 
ruggershawn ruggershawn is offline
Junior Member
Join Date: Jan 2008
Posts: 1
 
      01-30-2008
Do you know how to create a Jar in Netbeans that includes all dependencies?
 
Reply With Quote
 
AndreNTX AndreNTX is offline
Junior Member
Join Date: Feb 2010
Posts: 1
 
      02-19-2010
Many thanks to "tha_specializt" for his post.
 
Reply With Quote
 
buggirl buggirl is offline
Junior Member
Join Date: Dec 2011
Posts: 1
 
      12-14-2011
Quote:
Originally Posted by tha_specializt View Post
Why use a Eclipse if you can use a well-suited, fast and optimized out-of-the-box-IDE?
Easy as pie: (Netbeans 5.5)

right-click your project,
"set main project",
select your project,
"File",
"PROJECTNAME Properties",
"Run",
set your main class,
"Libraries",
"Add JAR/Folder",
select your wanted libs,
do a CLEAN build,
enter the build-path,
enter /dist and be amazed --> DONE!

No Modifications/Hacks/buggy DiY-IDE´s, no cry

Hi, this sounded so good. I have had so much trouble with this. I just can't seem to get my jar file runnable. I have followed you steps, I do my clean and build, but when I try to run it from the dist folder is still doesn't work..! I think I might not add the right "libs".. what do you mean exactly by this? Sorry, I am very new to Java and netbeans...!
 
Reply With Quote
 
jvjv jvjv is offline
Junior Member
Join Date: May 2012
Posts: 1
 
      05-03-2012
very clear and simple tha_specializt.. thank you
 
Reply With Quote
 
educatedmonkey educatedmonkey is offline
Junior Member
Join Date: Sep 2012
Posts: 1
 
      09-21-2012
thanks just what i was looking for
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create executable from executable with py2exe vedrandekovic@gmail.com Python 0 03-29-2008 12:23 PM
Running an Executable Before Executable JAR Jason Cavett Java 8 05-16-2007 07:14 PM
Executable Jar not behaving same as in debug (eclipse ide) PhilBray Java 3 09-19-2006 09:09 PM
Building a GUI using NetBeans platform (not Netbeans IDE !) Pimousse Java 2 04-21-2004 07:22 AM
NetBeans IDE Windows executable file? Mark Haag Java 1 09-17-2003 08:23 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57