Jump to content
  • Advertisement
Sign in to follow this  
Radiocreed

[java] How do i create a standalone java exe?

This topic is 4910 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

I managed to create JAVA exe with a program called 'Java Launcher'. The exe produced works fine on my computer and other computer science people's computer. When I run it on a computer virgin of any JAVA stuffs, it complains 'JDK not installed'. Any help please?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
The JDK obviously needs to be installed on the target computers. No (reasonable) way around that...

Share this post


Link to post
Share on other sites
Java is a language that runs on a virtual machine. With the virtual machine to interpret it, the computer looks at the code and goes, "What the crap is this?"

Share this post


Link to post
Share on other sites
What it really requires is the Java Runtime Environment (JRE), not the Java Software Development Kit (SDK). You can however use the GCC Java Compiler, which you can find links to here. I personally haven't used it, but it could be what you're looking for.

Share this post


Link to post
Share on other sites
Is there an easy way to link the class files, and create a 'shortcut' the the JVM stuff? I've never actually ran any of my programs outside my IDE, or as an applet.

Share this post


Link to post
Share on other sites
Link? About what are you talking?

But if you really want something then

main: yourClassFileHere
dont forget enter at end of the line

Share this post


Link to post
Share on other sites
Quote:
Original post by Talroth
Is there an easy way to link the class files, and create a 'shortcut' the the JVM stuff? I've never actually ran any of my programs outside my IDE, or as an applet.


Not entirely sure what you mean, but I think that executable Jar files might be what you're looking for...

BTW: Am I the only one who doesn't like the idea of native executable wrappers for Java? It kinda defeats the purpose of its cross-platform capabilities, doesn't it?

Share this post


Link to post
Share on other sites
Quote:
Original post by doodle_sketch
BTW: Am I the only one who doesn't like the idea of native executable wrappers for Java? It kinda defeats the purpose of its cross-platform capabilities, doesn't it?
I must admit I'm not a fan of wrappers either, so no, you're not the only one. :) I always thought executable JAR files did a fine job. Of course, if you want to have a custom icon associated with your program I think you might have to settle for a wrapper.

Share this post


Link to post
Share on other sites
I use wrappers when sending my java programs to people who need to see the 'ExpensiveProgram.exe'. By doing this I can save the hassel of having to retell every person who uses the program that it needs the JVM to run... They always look at you like they don't believe you. "Isn't it just a program?" they don't get that not all programs are exe files... On macs it is no problem because I can create app files, and then usually for people who run Linux or Solaris they know what the heck a dang JAR file is.

I find that wrappers help people to just RUN the program without having to call me up.

Share this post


Link to post
Share on other sites
Yes! That's the main benefit of it I would think. No need to have the JRE installed. The cost is that you'd have to "recompile" for every platform you want to run on. Any other downsides to it? It sounds interesting, will have to try it sometime.

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!