Spent this afternoon getting 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 working 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 written will compile, you’ll have to set your CLASSPATH environment variable correctly. From Sun’s page I found the command (which, believe it or not, I’d never come across before in Windows), and I used the following 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 messages about java.lang.NoClassDefFoundError.
Using Custom Libraries
As part of my course I get to use an IO library provided by Warwick to assist with us newbies’ IO, the uk.ac.warwick.dcs.util.io package. I couldn’t figure out why javac was complaining about not being able to find the package, until I found out that I had to include a reference 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 command above.
There, wasn’t that helpful? :-) 
![]()
Pablo Francisco and Arnold’s Pizza Shop
I was introduced to some gems this weekend :-D. Pablo Francisco, hilarious comedian — check out the videos on his site, especially the stand-up routine from the Jay Leno show (WMV, RM). This guy had me doing Movie Preview Guy impressions all weekend. The other gem was a classic — 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 pepperoni and punch it through your head.” :-) 
![]()