Wednesday, August 08, 2007

To java -jar or not to java -jar

I'm "going to get technical" on yous since I spent some time on this at work trying to figure out what the f-ing hell I was doing wrong, and to remind myself in case I ever needed to work this out in the future.

You CAN jar up a bunch of classes, specifying your main class to execute, and the classpath with which to execute it with by calling:

java -jar .jar

BUT, you must.. and I cannot stress that enough, specify which class is your Main-Class in the jar's manifest.mf file (who would've thunk...):

Main-Class: com.package.my.main.class

AND, you must.. and I again cannot stress this enough, specify the classpath for your class. Easy you say? Yep it is, if you remember to use RELATIVE PATHS for any jars you need. Yes you read it right, relative, not absolute, only relative... separating them with spaces, not semi colons or colons, spaces.

Class-Path: ../../some-silly-jar.jar ../some-other-silly-jar.jar

And you can use ant to jar up your files and specify those attributes for you too. No examples for this one though, (I'm at home now, not at work ;)

Perils of Parallel Skiing

I went to Falls Creek and Hotham to ski last weekend ..... it was sooooo cool!
The snow wasn't all powdery as you would expect from all the snowfall that we had while we were skiing. The wind didn't deter us from skiing all over Falls Creek and Hotham though we mostly had good - fair visibility all the way.
It wasn't until Sunday 5pm that the wind blew so hard that I could barely see 5 meters in front of me!

I did try to parallel ski, 3rd in my stages of skiing professionalism. 1st you slide down the hill and yell out profanities while praying that you don't hit anything (One time, at Falls Creek, I hit a snowmaking machine's net and tore a little hole thru it.. shhhhhh!). 2nd you start snow ploughing, which is good enough to slow you down on the green (read: beginners) slopes. But on the blues (read:intermediate or damn steep) slopes, it only serves to increase your speed while making you feel helpless in the face of impending doom. So this time I've slowly (picture a snail if you will..) tried to move up into parallel skiing.

My skis do look parallel.. but as Rex would say they need to be closer together to have any effect. I did go a bit faster and I no longer take 30 mins to get down the slopes as I did the first time ;) Pics to go up in Flickr once I upload em.