This is a discussion on Re: Creating a java executable - Java ; Ian Wilson wrote: > KNelson wrote: > >> Hi, I would like to make a java executable. I am aware I need to jar >> it, I have the manifest file, and it will run when I type java -jar ...
Ian Wilson wrote:
> KNelson wrote:
>> Hi, I would like to make a java executable. I am aware I need to jar
>> it, I have the manifest file, and it will run when I type java -jar
>> *** so I know the jar worked BUT, it will still not work when I double
>> click it. That is what I want, I want to run it on the double click.
>> jar cvfm This.jar manifest.mft This.class is what I am using to
>> make the jar. When you respond to this, make sure you know your
>> method works on the double click, because I can get the jar to run
>> from the command line. THANK YOU any help would be appreciated
> You appear to be using Windows.
> When I installed JDK and Eclipse on Windows, the appropriate file
> associations were set up for me. I can double click a jar file (desktop
> icon or Windows Explorer) to launch the application it contains.
In case it's of any help ...
jarfile="C:\Program Files\Java\jre1.5.0_10\bin\javaw.exe" -jar "%1" %*
You can use assoc and ftype commands to create the above associations
(substituting whatever is appropriate for your JRE).
This question might have been more appropriate to comp.lang.java.help.
So I have crossposted it there and set followups accordingly.