Making Jar files Run
By Pete Freitag
I recently had to reinstall my OS, and more recently had to use a Java Application called JEdit. JEdit's installer didn't create any shortcuts for me, so I had to run JEdit from the command line by invoking it's jar file with
java -jar jEdit.jar. Since I had just installed java, it was not part of my system path yet, so I actually had to run something like this
C:\j2sdk1.4.2_02\bin\java -jar jEdit.jar, quite a pain but it got me thinking about somethings that could be done by Sun when I installed the JVM that would have made my life a lot easier.
First they could have given me the option to add C:\j2sdk1.4.2_02\bin\ to my system PATH. What java developer want's to update this every time they install in new JDK, along with the JAVA_HOME environment variable that some java apps need (like Ant)?
The second issue: why don't jar files execute when you double click them? This turns out to be a fairly easy workaround for someone who knows what they are doing, you just need to set javaw.exe to execute jar files. That is easy for a software developer, but wouldn't it be easier if the JVM did this for you when it was insatlled? Software developers could just say: download this jar file and double click it to run!
If anyone has contacts at Sun, please feel free to forward my comments to them! I'm not just complaining, I'd like to see Java easier to use and more appealing for desktop apps.
Making Jar files Run was first published on November 14, 2003.
If you like reading about java, jar, or jvm then you might also like:
- Updating Java on ColdFusion or Lucee
- Getting Size of Heap and Non Heap Memory in CFML
- Adobe Says Go Ahead and Upgrade your ColdFusion JVM
- Enabling Unlimited Strength Cryptography in ColdFusion
Weekly Security Advisories Email
Advisory Week is a new weekly email containing security advisories published by major software vendors (Adobe, Apple, Microsoft, etc).