From: SourceForge.net <no...@so...> - 2003-03-13 04:04:47
|
Bugs item #702733, was opened at 2003-03-13 04:16 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=438935&aid=702733&group_id=44253 Category: Interactions Group: Serious Status: Open Resolution: None Priority: 5 Submitted By: Charles Reis (csreis) Assigned to: Charles Reis (csreis) Summary: Problem with static fields / classpath order Initial Comment: This is an odd one... The interactions pane appears to be unable to use static methods or fields on a subclass of a class in a separate directory, if the subclass's directory appears on the "Extra Classpath" before the superclass's directory. More specifically, suppose A.java is in dir1, and suppose B.java is a class that extends A and is in dir2. Both classes are public and in the default package. Give B a static field x and compile the classes (inside or outside of DrJava). Now, in DrJava, put dir2 on the "Extra Classpath" config option before dir1, and then reset the Interactions Pane (without any documents open). If you type "B.x", it complains that B is an undefined class. (Actually, it's throwing a NoClassDefFoundError for A, but this is how it gets displayed in the beta release.) However, if you type "new B()" or "new B().x", it works perfectly. It appears to only be static fields/methods that cause this problem. Note that this is not a DynamicJava bug, but it's probably related to our extension of their code. (It does not occur in DynamicJava's GUI.) Temporary workaround: put the superclass before the subclass on the "Extra Classpath" config option. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=438935&aid=702733&group_id=44253 |