Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
make java program .exe
Name: mullen103 Date: March 24, 2005 at 05:50:37 Pacific OS: xp CPU/Ram: 256
Comment:
Hello. I am new to java programming. I have made a couple of silly programs but how do i get them to run on another computer. For example to make a vb program work on another computer yoou go to make xxx.exe and its easy but i do not know this for java. I am using netbeans as my environment thanks.
Name: kl365 Date: March 24, 2005 at 06:31:04 Pacific
Reply:
In order to maintain its cross-platform capability, Java uses a Virtual Machine (JVM) to execute its code. This means that you can't create an executable file in the .exe format.
What you can do though is create a .jar (java archive) file that will execute in the same way an .exe file would.
How does this work?
A .jar file is associated with the java app that lets you run your programs. The archive contains a list of the necessary .java files and a special file that tells the JVM how these files relate to each other. Once you've created your archive you can run it just like an .exe file, the only difference is that the .jar file will run on any machine while the .exe is limited to windows.
the sun home page has some good tutorials on how to create and efficiently use .jar's. good luck!
Summary: I havnt been programming in java for too long, but im pretty handy in C++ so :). Im curious as to how I go about making a java program exe. I remember reading something about making a .jar file but it...
Summary: If you want to make your program fit to a user's screen, there's something called the windows Toolkit in Java. I forget if it's part of AWT or Swing, but you can get the user's screen size (inside a J...
Summary: Can someone please make a simple .exe program for me? All i need it to do is: delete C:\sierra\redbaron3d\data\rbprefs.dat then load C:\sierra\redbaron3d\baron.exe I'm having trouble with this game....