Skip to main content
GameDev.net gamedev.net
🔒 Locked

[java] Making an .exe file

Started by Wrathnut Oct 30, 2000 at 2:32 PM 9 replies 650+ views
JonnyQuest
JonnyQuest
I''d say use the Java Development Kit (JDK)

IIRC it''s found at java.sun.com or jdk.sun.com or so. (you get the picture)
if you can''t find it try www.sun.com

- JQ, PWC Software
"programming is all about wasting time" -me
~phil
acraig
acraig
quote:
Original post by Wrathnut

Is there any FREE java compilers out there that can compile a java applet or application as an executable file?





A quick search on Google turned up How do I make an .EXE in Java?

I hope that there is a good need for this since you lose a lot of what Java is about.


-------
Andrew

Edited by - acraig on October 30, 2000 4:13:45 PM
Wrathnut
Wrathnut
^_^ Yes, and no(there is a good reason). I''m working on an arcade type of game, which I''m going to distribute as an applet, but I want to see if I can squeeze more frames per second out of it as an .exe If I can see a noticable difference then I''m going to add an FX engine to it that will do some alpha blending and cool stuff like that.

War doesn't determine who is right, war determines who is left.
felonius
felonius
> Making an applet or application to a EXE

Applets:
No. If you made your applet into an exe it couldn''t be run in browsers, so why make it an applet in the first place. So this really dosn''t make sense.

Applications:
Use JGC included with cygwin (assuming you are using Windows). It is a free native Java compiler.
www.cygnus.com/cygwin/
Or better yet pay for a commercial one an get better quality.

Jacob Marner
Jacob Marner, M.Sc.Console Programmer, Deadline Games
Wrathnut
Wrathnut
Thanks felonious for the link. Unfortunately I''m just a poor college student and I can''t afford something like code warrior or anything like that. I really don''t think my boss at work will want to spring for a different software development proggie either, He would rather use microspank.
And just for the record: Making an applet into an exe is a worth while goal, when I plan on sending the game to a person that doesn''t have access to the internet. And before anyone tries to rip this kind of logic apart I already know that you would have to make the applet into an application first..

But Like I said thanks a ton. The only free compilers I found that would compile a binary were for linux.

War doesn't determine who is right, war determines who is left.
felonius
felonius
quote:
Original post by Wrathnut

Thanks felonious for the link. Unfortunately I''m just a poor college student and I can''t afford something like code warrior or anything like that. I really don''t think my boss at work will want to spring for a different software development proggie either, He would rather use microspank.
And just for the record: Making an applet into an exe is a worth while goal, when I plan on sending the game to a person that doesn''t have access to the internet. And before anyone tries to rip this kind of logic apart I already know that you would have to make the applet into an application first..



It is okay to write the program as an applet if you intend the primary audiance to be on the net. It is correct that some people don''t have an internet connection, but if you pack the applet into an exe (with some kind of appletviewer) then your user will not see it like the web users will - the web users see instructions and the general web layout.
So why not just send your webpage - including applet - to the guy without internet. I can''t imagine anybody without a web browser (even if they don''t have internet access) as this comes preinstalled with both Windows and Linux. Then this can be used to view the page locally.

But I see your point, but I still think it is a bit farfetched and that those making Java development tools could use their time a more important things.

And for all your thanks: You are welcome.

Jacob Marner
Jacob Marner, M.Sc.Console Programmer, Deadline Games
ToddH
ToddH
Hi,

If you are writing an applet, you can import the package
com.sun.j3d.utils.applet.MainFrame; (From java3d I think)

Then include a main method with something like
new MainFrame(new MyApplet(), 640, 480);
and you can run your program as both an applet and an application without having to worry about two implementations.
Todd.
ToddH
ToddH
Oh, and btw, check out
the compiler JET at http://www.excelsior-usa.com/jet.html
This is a pretty good compiler. It is in beta stage atm, so is free, and you should get it before they make you pay for it.
You do require jdk1.3, but the speed increase is pretty good, even though exe''s are a pretty large
Todd.
SaltySnacks
SaltySnacks
I have a similar problem. My reason for compiling a java app to an exe is for the simple reason that threads and sockets are easy in java and I want an exe that i can put on a floppy disk and transport around to machines that do not have the java runtime installed. I tried JET, but it requires the JRE. So my question is: Is there anyway to compile a .class file into an exe w/o 20 megs of dlls or w/o having the jre installed.

Thanks,
SaltySnacks
snowmoon
snowmoon
You can not fit the awt into 1.44 megs let alone the rest of the interperter. You may want ( if possible ) to use a earlier version of the jre and strip one file at a time to see how small you can get. There are lots of files in the bin directory that go unused for most people''s use ( rmi, idl, ... ).

Have you ever thought of using the jre on a cd-rw or cd-r? You could set up the jre and a autorun.inf file so your app launched immedatly upon loading the cd-rom. This way you don''t have to scrounge for something that is probably not availble.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.