Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-06-2008, 09:00 AM
Member
 
Join Date: Nov 2008
Posts: 10
Rep Power: 0
radix is on a distinguished road
Default How to create exe file in java
I'm sorry if this question already exist, I am new to java and I am using netbeans 6.1 and I don't know how to compile my project to exe file. Could anyone have any solution to this please.
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 11-06-2008, 09:23 AM
Senior Member
 
Join Date: Jun 2008
Posts: 1,375
Rep Power: 3
masijade is on a distinguished road
Default
You don't. Java is not used to make native programs. Simply package it into a Jar.

Lesson: Packaging Programs in JAR Files (The Java™ Tutorials > Deployment)
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 11-06-2008, 09:35 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 7,446
Rep Power: 11
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Default
Same question we've discuss several times here in our community. Search the forum, you can find lots of comments on this.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
Someone helped you? their helpful post.
Help:Forums FAQ|How To Ask Questions The Smart WayResources:The Java Tutorials|Glossary for Java|NetBeans IDE|Sun DownloadsWeb:WritOnceTips:Is your IDE the best?|Which Application Server?
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 11-06-2008, 09:36 AM
Member
 
Join Date: Nov 2008
Posts: 10
Rep Power: 0
radix is on a distinguished road
Default
I know some program created in java like "Limewire" but how they created an exe file for their program?
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 11-06-2008, 09:52 AM
Senior Member
 
Join Date: Jun 2008
Posts: 1,375
Rep Power: 3
masijade is on a distinguished road
Default
If you insist then Google for "exe builder" for Java. You have already been told thought, that that is not the way to go. You lose Java's cross-platform ability (which is one of it's largest draws), and any native program created from it will suffer in comparison to a native program created in a language designed to do so. So, you wind up with the worst of both worlds.

Like I said, package it into a jarfile, using the tutorial I gave you. If you set up the manifest file right (which is described in the tutorial), and your system settings are correct, you can still execute it with a "double-click", which, I think, is your "real" concern.
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 11-06-2008, 10:20 AM
Member
 
Join Date: Nov 2008
Posts: 10
Rep Power: 0
radix is on a distinguished road
Default
Thank you very much for the info masijade I'm just curious how they do create their java file to exe. Now I know how to do, just I need a "Java Executable Wrapper". And I found this little app. "Launch4j"

Once again thank you very much.

Cheers!
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 11-06-2008, 02:45 PM
Senior Member
 
Join Date: Sep 2008
Posts: 129
Rep Power: 0
georgemc is on a distinguished road
Default
It's about time this "native executables are the only way to run software" myth was put to bed. If you knock up a quick shell script, you don't bother compiling it to a native binary. If you build a webapp you don't try and force it into an executable. Why people want to invest effort in making something appear to be something it isn't, for no actual benefit, is a mystery to me. A Java app runs inside a JVM, and there exist ways of packaging the software to exactly that end. Use them
</rant>
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 11-06-2008, 02:53 PM
Senior Member
 
Join Date: Jun 2008
Posts: 1,375
Rep Power: 3
masijade is on a distinguished road
Default
Originally Posted by georgemc View Post
If you build a webapp you don't try and force it into an executable.
</rant>
how to make exe file for jsp project - JSP

;-)
Bookmark Post in Technorati
Reply With Quote
  #9 (permalink)  
Old 11-06-2008, 05:17 PM
Senior Member
 
Join Date: Sep 2008
Posts: 129
Rep Power: 0
georgemc is on a distinguished road
Default
Originally Posted by masijade View Post
how to make exe file for jsp project - JSP

;-)
Exactly my point

There are always tools in existence to achieve these things, but that doesn't make it the right thing to do. For unfathomable reasons, people have this notion that unless something is bundled as a native executable, it's somehow not "proper" software
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create SQL File JavaForums Java Blogs 4 04-17-2009 04:46 AM
How to create file on server? thevoice New To Java 8 01-15-2009 10:34 AM
can java.io.File create a list of all files and folders. MattStone New To Java 20 12-17-2007 04:20 PM
How to create a xml file from oracle sql query boy22 XML 1 07-24-2007 01:15 AM
How to create a file Alpha New To Java 2 05-25-2007 09:44 PM


All times are GMT +2. The time now is 12:18 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org