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

From: Amey Samant (ameyas7_at_yahoo.com)
Date: 10/04/03


Date: 4 Oct 2003 01:37:28 -0700

qkname@yahoo.com (QQ June) wrote in message news:<5613bbf8.0310020815.7d031e3e@posting.google.com>...
> 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 ??

> Thanks & regards,
> June

hi there
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
explorer
or even lets say if your file is Demo.class then you can run it at
command prompt

c:\ur_dir>Demo.class

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 +
cmdline_arguments
invoke it & you are done.

remember the file does not touch your .class files, it just makes use
of windows file association feature.

regards
amey