Computing.Net > Forums > Programming > make java program .exe

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

Reply to Message Icon

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.

www.mullen103.com



Sponsored Link
Ads by Google

Response Number 1
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!

kl365


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: make java program .exe

How do i make a java executable pro www.computing.net/answers/programming/how-do-i-make-a-java-executable-pro/13259.html

Help needed to test new Java program www.computing.net/answers/programming/help-needed-to-test-new-java-program/772.html

make simple program for me? www.computing.net/answers/programming/make-simple-program-for-me/690.html