Heal Your Church WebSite

Teaching, rebuking, correcting & training in righteous web design.

Executing a .JAR Application on Win2k

I received an e-mail via a “comment” today directing my attention to a client application for posting blogs to Blogger.com entitled Chronicle Lite. I downloaded the .JAR file.

.JAR file? What’s that you ask? The Java Glossary defines it as “Java classes forming an application, Applet, or weblet can be bundled up into something that looks very much like a ZIP file. JavaBeans are also packaged in JAR files.” In other words, instead of having a program named ChronLite.exe, you execute the JAVA runtime using the .JAR file as an argument. I bit “UNIXy” I know, but this insures cross-platform compatibility. Of course, this also means you need to make sure you’ve installed the JAVA Runtime or SDK. Since I code, I have the SDK.

If you’re using Windows, you also need to make sure your PATH environment variable includes the JAVA \bin directory containing the executable java.exe. If you don’t have JAVA on your system, you need to go to Sun and download the appropriate product for your needs. If you’re running on a Windows 2k/Mil/XP it wouldn’t hurt to check and/or set this variable via the Advanced Tab of the System Properties control panel:

Windows 2000 Advanced Tab of System Properties Control Panel

Check to see if your path includes your
Observe, append, ammend &/or otherwise make sure your path includes your JAVA path, on my Win2k system that is C:\j2sdk\bin or:

Observe, ammend, append your path

Assuming I downloaded the .JAR file to the directory “C:\foo” and for convenience, renamed it to ChronicleLite.jar, I need only issue the following command line directive – or RUN the following:

\j2sdk\bin\java -jar C:\foo\ChronicleLite.jar

Notice, I used the “java -jar <filename>” syntax. As always, your mileage may vary – though in this case, it may help to read the Java Glossary : JAR file page.

Oh, by-the-by. Since this site uses MovableType, I had to test the probram on a test site I have over at blogger.com. I think I’d like less hot keys and a few more idiot buttons when it comes to formatting.

One Comment

  1. Couple of comments: When you install the JRE from Sun (or even the JDK for that matter) it sets up an automatic association between ‘javaw.exe’ and .JAR files on a Windows machine. This means you *should* be able to double click JAR files as though they were .EXE files, to execute them.

    Ive worked for the last few days on getting non-Blogger support into Chronicle Lite. Your feedback was really helpful, and, prompted the coding frenzy. I posted to a Nucleus based blog a few minutes ago but I think my Movable Type test blog isnt configured correctly right now as it’s persisting in being objectionable. I need to add a more friendly user interface for configuring the blog servers (or rather, *some* interface), and I’ll be happy to give you a new copy.

    So, thank you, feedback was much appreciated.