qk****@yahoo.com (QQ June) wrote in message news:<56**************************@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