Andrew McIntyre wrote: > A recent change to ij.java added the following line: > > + ijE = new org.apache.derby.impl.tools.ij.Main14(false); > > Apparently the default classloader, when it sees that this class may > be instantiated, will attempt to load this class. On JDK 1.3.1, this > leads to an UnsupportedClassVersionError being thrown, since Main14 is > compiled with "-target 1.4". The solution is probably to load the > class via reflection. At the end of this mail is a proposed solution, > but I'm sure it could be improved. I simply catch and report any of > the exceptions that are thrown by the reflection methods. We're > unlikely to hit any of them, and throwing them seemed like quite a > burden for a public API, but maybe there's a better way to handle all > these. I also haven't tried this with the security manager yet. > > Any comments greatly appreciated. If anyone feels this requires a JIRA > to fix, let me know, otherwise, it might be considered a part of > DERBY-1609.
I've put in a temp fix and will work on a real fix as part of DERBY-1609. I assume this is the same reason as to why the "mt" test code always loads the utilMain class, even in a jdk 1.4 environment. I almost thought about changing that to use utilMain14, glad I didn't now! Dan.
