The latest amusements at work have all revolved around J2EE, and the environment that we use for developing the same. I really like being able to test my code, and in particular test it in isolation - without having to wait for a server to start, without dependencies on the database, and so forth. UnitTests, in the XP sense of the word.
At the end of the week, I was refactoring - extracting some classes into their own files. Having pulled the first one out, I reran the test - just out of habit. And the test failed - the compiler complained of duplicated classes. Ah, says I, I need to rebuild. Same error. Hmm. Perhaps it's confused. Rebuild the package? Same error.
OK, reality check. Drop to the command line, build the package with Ant. No problems. Back to JBuilder, and the conflict isn't resolved. Take a look at the dates in my classes directory. They are correct. Blow those files away and rebuild. Nope.
A hint from a colleague - rename the class directory. Hey presto! A bit of digging (suggested by colleague number two) shows that JBuilder cached a bunch of class names, and tucked them away in a subdirectory of classes. Who knew?
March 9, 2003 8:41 AM
| TrackBack