The Three Rules for Debugging Your Java Environment

It has been a while since I was an every-day-all-day Java developer and since that time (vi on Solaris or HP-UX) tools like Eclipse have made the Java environment greatly simplified. However, just this week I was reminded that, even in this easier world, there are three rules I came up with way back then that still apply when you are debugging a ClassNotFound or other sort of environmental error:

  1. It’s your classpath. Go through your path a character at a time if you have to.
  2. It’s permissions. You don’t have read or write access to something. Look through every line of code that accesses a resource and validate that you have the proper permissions to get to it.
  3. It isn’t permissions? Sorry, it really is your classpath. Go back to rule 1!
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s