Re: How to make a executable file, such as myprogram.exe, for java ?

From: Brad BARCLAY (bbarclay_at_jsyncmanager.org)
Date: 10/02/03


Date: Thu, 02 Oct 2003 17:54:13 GMT

QQ June wrote:
> Hello,
>
> I have some java classes. But, I don't want my users to type "java
> my_java_program" every time they run the java class ?
> How do I pack them together into one executable file, like
> myprogram.exe. ?
> Any tools can do this for me ??

        This is the sort of thing that scripting languages are for.

        Creating an EXE file out of Java sources is generally evil. Java is
designed to be completely platform-neutral -- your .class files are able
to run on any OS and hardware platform. As soon as you package them
into an EXE file, however, you've now locked your code to run on ONE OS
on ONE hardware platform.

        Instead of doing this, package your classes into a runnable JAR file.
Then create a script that will launch it for the user.

        HTH!

Brad BARCLAY

-- 
=-=-=-=-=-=-=-=-=
 From the OS/2 WARP v4.5 Desktop of Brad BARCLAY.
The jSyncManager Project:  http://www.jsyncmanager.org