Java Niggles

Spent this after­noon get­ting to grips with Java, which I haven’t touched for a long time. Many moons ago I did attempt to learn some, but the book I bought was ass, so I stopped. While work­ing with it today I had to find out a couple of things which I thought I’d share. This is basic stuff, but I didn’t know it until 2 hours ago, and it wasn’t easy to find out then.

I’m using the J2SE Dev Kit 5.0 Update 5 on Windows XP.

Environment Variables
Before any Java apps you’ve writ­ten will com­pile, you’ll have to set your CLASSPATH envir­on­ment vari­able cor­rectly. From Sun’s page I found the com­mand (which, believe it or not, I’d never come across before in Windows), and I used the fol­low­ing to cover all my bases:
> set CLASSPATH=C:\Program Files\Java\jdk1.5.0_05\lib;C:\Program Files\Java\jdk1.5.0_05\bin;C:\Program Files\Java\jdk1.5.0_05\;C:\Program Files\Java\jdk1.5.0_05\include
If this isn’t set up right, you’ll get error mes­sages about java.lang.NoClassDefFoundError.

Using Custom Libraries
As part of my course I get to use an IO lib­rary provided by Warwick to assist with us new­bies’ IO, the uk.ac.warwick.dcs.util.io pack­age. I couldn’t fig­ure out why javac was com­plain­ing about not being able to find the pack­age, until I found out that I had to include a ref­er­ence to the file in my CLASSPATH, adding C:\Program Files\Java\jdk1.5.0_05\lib\uk.ac.warwick.dcs.util.io.jar to the com­mand above.

There, wasn’t that helpful? :-) B

Posted October 4th, 2005

Pablo Francisco and Arnold’s Pizza Shop

I was intro­duced to some gems this week­end :-D. Pablo Francisco, hil­ari­ous comedian — check out the videos on his site, espe­cially the stand-up routine from the Jay Leno show (WMV, RM). This guy had me doing Movie Preview Guy impres­sions all week­end. The other gem was a clas­sic — Arnold’s Pizza Shop. “If you don’t fuck around, I’ll give you good pizza; if you do fuck around, I’ll take a pep­p­er­oni and punch it through your head.” :-) B

Posted October 3rd, 2005

You can find a complete history of older posts in the Archive.