Jump to content
  • Advertisement
Sign in to follow this  
Cacks

[java] Compiling Java to native code

This topic is 4810 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys, I'm wondering how to compile my Java projects into an exe? i.e. if I make a game, how can I distribute it? I'm using eclipse btw. Thanks for any help!!

Share this post


Link to post
Share on other sites
Advertisement
I didn't realise that I just couldn't compile Java to native code from any IDE into an exe. Then how do Sun prefer you to distribute applications?

Share this post


Link to post
Share on other sites
As a WAR or EAR file, or as an executable JAR file possibly with some batch/shell scripts to startup your application.

EDIT: Oh, or as a jnlp file for Java Webstart.

Share this post


Link to post
Share on other sites
That depends on which solution you use (see posts above). It also depends on whether you expect your users to have a JVM already installed.. Do you?

Share this post


Link to post
Share on other sites
If I made a game in Java then I would have to consider my users having a JVM installed or not installed. If I had to distribute a JVM, would I have to pay Sun royalties?

Share this post


Link to post
Share on other sites
Well in that case the second link above handles both situations.

Alternatively you could simply have a installation.txt / install details on your website with a link to download the JVM from Suns website.

And, no, you don't have to pay SUN royalties, that would be silly and would kill off Java as a language people wanted to work with - what would be the point?

I recommend you read the links already provided and consider what you want to do.

Jon

Share this post


Link to post
Share on other sites
Anyone stupid enough to try to run a Java app without the JRE doesn't deserve to use your program. [lol] That's the way I look at it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!