This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi, I've created a executable Jar file on Windows XP. While I can execute the jar file at the command line (java -jar foo.jar) I can't seem to have the file execute when double-clicking on the icon. I haven't been able to figure out the problem. Can anyone help me? Thanks. -Brian
I'd guess that the file associations that your operating system is using for .jar files aren't configured properly to be able to run execute a JAR by double-clicking on it. You can try to configure this setting manually, or you could try to remove the file association completely and then reinstall the JRE or J2SDK. My setting, which works for me, for the action to take when double-clicking a JAR file is "D:\Program Files\Java\j2re1.4.2_03\bin\javaw.exe" -jar "%1" %* If you need more detailed help on changing this setting, just ask. [ February 15, 2004: Message edited by: Dirk Schreckmann ]
Hi Dirk, I've removed the file association and reinstalled the JDK and it still doesn't work. Here's the path associated with the Jar file: "C:\Program Files\Java\j2re1.4.2_03\bin\javaw.exe" -jar "%1" %* Thanks for your help, but I'm not sure what else to do. I'm at a loss. --Brian