Wednesday, October 11, 2006

Sun Microsystems Needs Better Documentation

So last night I was messing around with some of my code, I decided to load up my Java into a jar and give it a try outside of eclipse. Of course my normal classpath setting wouldn't make Java understand that the database resource I needed was available so it wouldn't run. However there is this nice utility called Java-config that lets you set the classpath.... so lets use that. Wrong! Java-config's classpath options are all depreciated so they don't do anything. All the documentation online points to these as the ways of fixing this problem. Thankfully however I stumbled on a forum post that made sense.

If you can't get a class to load on your classpath with Java 1.5 and later: make sure its in your /opt/sun-jdk-1.5.0.08/jre/lib/ext/ directory, where the sun-jdk-1.5.0.08 is your version. Its similar under windows but I can't remember the exact path but it should be something like C:\Program Files\Java\Java-version-here\lib\ext.

I hope this helps someone else save 50 minutes of their life.
-Toraux

No comments: