Eclipse Experts Out There?
I'm trying to do something that ought to be really simple: tell Eclipse where to find a Java class. I have two classes, in two separate files (as Java generally prefers): ButtonDialog and ContextSensitiveHelp. ContextSensitiveHelp has the main; ContextSensitiveHelp needs to be able to find ButtonDialog class. When I run ContextSensitiveHelp, ClassNotFound exception happens.
Outside of Eclipse, this would be easy: set CLASSPATH to include the directory where both of these classes are located. But this is Eclipse--not so simple, it seems.
I've already discovered that Project->Properties->Java Build Path only tells Eclipse where to look for what to build; it doesn't set the CLASSPATH so that ContextSensitiveHelp can find ButtonDialog at runtime. So Run->Run Configurations takes me to a tab that lets me set the CLASSPATH--but both ContextSensitiveHelp and ButtonDialog are in the same directory. What am I missing?
UPDATE: It appears that the CLASSPATH started finding ButtonDialog after I closed Eclipse and restarted it. This is a bit surprising.
No comments:
Post a Comment