Results 1 to 4 of 4
- 12-03-2010, 12:04 AM #1
Member
- Join Date
- Mar 2009
- Posts
- 45
- Rep Power
- 0
Making a netbeans project into a executable jar file
Hi all,
Just wondering like i have a netbeans project and can run it from the main there, but is there a way to create a executable jar file from this project? The project I want to test is a console based one, I tried an online tutorial for a GUI which works but cant get a console version to work?
Any way to do this? Or can anyone point any good tutorials please.
Thanks
- 12-03-2010, 12:16 AM #2
Member
- Join Date
- Sep 2010
- Location
- Oregon, usa
- Posts
- 69
- Rep Power
- 0
I'm using Netbeans and what I do is right click the project in the project pane and click on Clean and Build. This should create a jar file in the dist folder of your project. You should be able to click on the jar file to run your program.
Hope this helps!
Chris
http://netbeans.org/kb/trails/platform.htmlLast edited by tashimoto; 12-03-2010 at 12:22 AM. Reason: added link to Netbeans.org site
:cool: It's all here: http://download.oracle.com/javase/6/docs/api/
- 12-03-2010, 12:27 AM #3
Member
- Join Date
- Mar 2009
- Posts
- 45
- Rep Power
- 0
Thanks for your reply,
I tried it and got the jar file. My project like has no GUI its console based, if i double click the jar file nothing happens, do I always have to execute this jar file from command prompt for it to work?
- 12-03-2010, 05:09 PM #4
Member
- Join Date
- Sep 2010
- Location
- Oregon, usa
- Posts
- 69
- Rep Power
- 0
That's a good question. I searched "java console based program" and found a link to some code that might help you: Simple Java Console (Swing based) (it has a disclaimer - I haven't used it so I don't know if it will work, but it might help get you pointed in the right direction.)
I'm not positive, but I think in order to run your console based program you do need to run it from the command prompt. Maybe you could add code to your program that opens a JWindow with a JTextArea (JWindow (Java Platform SE 6) ,JTextArea (Java Platform SE 6))
Sorry I couldn't be much help.
Chris:cool: It's all here: http://download.oracle.com/javase/6/docs/api/
Similar Threads
-
packing a netbeans project into a jar/exe file
By newToJava3 in forum New To JavaReplies: 1Last Post: 11-29-2010, 07:33 PM -
I am making a Netbeans plugin How do I capture the squiggles in the editor so I can a
By blueflash2o in forum NetBeansReplies: 4Last Post: 02-24-2010, 01:53 AM -
Stream problem when I export my project in a .jar executable archive
By Arsenicmic in forum Advanced JavaReplies: 3Last Post: 09-07-2009, 08:27 AM -
Executable java project ..
By xVent in forum Java AppletsReplies: 5Last Post: 03-29-2009, 06:46 PM -
Making Java Application Executable
By jadaleus in forum Advanced JavaReplies: 4Last Post: 10-23-2008, 12:59 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks