View Full Version : .class to .exe opinions
gufmn
10-08-2002, 09:32 PM
I'm trying to get some input on what people think is the best way to convert java.class files to exe files. I'm writing this durring the 1-1/2 hour process of Jet compiling all Java 2 Platform classes :)
sicarius
10-08-2002, 11:15 PM
Well. I don't know why you would need to convert them .exe files. If you are doing it for speed reasons (I am assuming this then means you conversion is actaully from Java to like C++ or something) then I understand. But if you reasoning is just so that someone can launch your application from the desktop you don't need to convert it to an .exe file.
In windows and some other environment .jar (java archive) files are executable. You can package an entire application in a .jar file and simply double click it to get it to execute. Of course this would require that the user has the appropriate JRE installed, but that shouldn't be a big deal.
gufmn
10-09-2002, 02:09 PM
sicarius: I am trying to make this a distributable application for users to launch from the desktop. I guess my real question is what is the preferred method of accomplishing this. I'm new to java and we haven't gotten that far in class yet. I'm just jumping ahead.
Thanks for your help
darelf
10-09-2002, 02:53 PM
As with all "interpreted" languages, the biggest hurdle to overcome is versioning. Any time you don't somehow "compile" everything into the package, you are requiring the end user to download and install the correct interpreter/modules, etc. That is, if the user has Java 1.3, but your app requires 1.4, the user has a problem. And in general, they will simply pass over your app in favor of one that works "out-of-the-box".
OTOH, if you package up everything in a simple install program that every Winblows-head is familiar with, that includes installing the correct interpreter, if necessary, then everything is cool.
There are lots of ways to do such things, and each developer has their own preferred method. Check out all the options and see what is most comfortable for you, and that gives you an "end-user-friendly" install package.
_underdog
10-09-2002, 02:55 PM
Executable jars are definitally the way to go. Some IDE's have jar tools that help you package up your applications or if you want to remain IDE independent you can use a build tool like Ant. http://jakarta.apache.org/ant/index.html With a good build file it can automate the build process.
gufmn
10-09-2002, 03:28 PM
Thanks for the input everyone. I heard Dru mention Ant as well and I think I'll give it a shot. However, all suggestions are welcome.
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.