How can I make my Java program run as a Standalone program?

How can I make my Java program run as a Standalone program?

Post by Zac54T » Thu, 03 Aug 2006 02:22:33


I am a relative beginner at Java programming. I have created a simple
Java Program for work, and I do not know how to make the program run on
different computers as a standalone program. What do I need to change
in order for the program to run without a program like Eclipse? I do
not want the program to be online as an Applet unless that is the only
way. I would prefer to make the program run from the desktop. All of
the computers are running Windows XP, and the program does not need to
run on different OS. Thanks for your help.
 
 
 

How can I make my Java program run as a Standalone program?

Post by AndrewMcDo » Thu, 03 Aug 2006 03:02:54

 
 
 

How can I make my Java program run as a Standalone program?

Post by cp » Thu, 03 Aug 2006 03:37:32

You can also make it a jar-file.

http://www.yqcomputer.com/
 
 
 

How can I make my Java program run as a Standalone program?

Post by Paul » Thu, 03 Aug 2006 03:42:11


If all of the machines have a java runtime, you just need to package it
into a jar and add the appropriate manifest entry.
http://www.yqcomputer.com/
see the part on "attribute defined for stand-alone applications" this
will tell you how to define the main class.

If the machines do not have a JVM then you will need a native compiler
such as the gcj (note: gcj doesn't work with awt or swing but, it does
work well with swt)
 
 
 

How can I make my Java program run as a Standalone program?

Post by Zac54T » Thu, 03 Aug 2006 11:26:12

Thanks for all the help, I got it to work using a .jar file.