Re: How to make a executable file, such as myprogram.exe, for java ?
From: Amey Samant (ameyas7_at_yahoo.com)
Date: 4 Oct 2003 01:37:28 -0700
email@example.com (QQ June) wrote in message news:<firstname.lastname@example.org>...
> 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 ??
> Thanks & regards,
i have written a c program that invokes java for you & you can also
provide any options or command line arguments .....
no support yet provided for .jar files (work in progress)
if you require it, i can mail it to you
its a simple .exe file which you can associate with your .class files
& then you can run your .class files just by double clicking them from
or even lets say if your file is Demo.class then you can run it at
i picked it up from an online tutorial.
if you want to write one heres the logic
parse your input & remove .class extension & also absolute path
provided if any
accept options switches
accept command line arguments
form a complete string with "java.exe " + options + class_name +
invoke it & you are done.
remember the file does not touch your .class files, it just makes use
of windows file association feature.