The development of a Java VM for .NET
For the time being I switched back to jikes 1.15. When trying to start Eclipse (M2), it failed with a ClassNotFoundException: org.xml.sax.InputSource.
It turns out that in org.eclipse.core.internal.runtime.InternalPlatform the following method causes a problem:
public
if (!(InternalBootLoader.isRunning() || InternalBootLoader.isStarting())) return RegistryLoader.parseRegistry(pluginPath, factory, debug);
// If we are running the platform, we want to conserve// class loaders. // Temporarily install the xml class loader as a// prerequisite of the platform class loader// This allows us to find the xml classes. Be sure to// reset the prerequisites after loading.
PlatformClassLoader.getDefault().setImports( new DelegatingURLClassLoader[] { xmlClassLoader });
try { return RegistryLoader.parseRegistry(pluginPath, factory, debug);} finally { PlatformClassLoader.getDefault().setImports(null);}}
The bold line basically adds the xerces plugin to the classpath, this is needed because RegistryLoader depends on it. However, in IK.VM.NET the RegistryLoader class gets compiled when the above parsePlugins method is JITted by the .NET runtime, and at that moment the xerces code is not yet available.
This is an interesting problem, but I'm not sure if this construction is actually guaranteed to work on all VMs by the spec.
Remember Me
I apologize for the lameness of this, but the comment spam was driving me nuts. In order to be able to post a comment, you need to answer a simple question. Hopefully this question is easy enough not to annoy serious commenters, but hard enough to keep the spammers away.
Anti-Spam Question: What method on java.lang.System returns an object's original hashcode (i.e. the one that would be returned by java.lang.Object.hashCode() if it wasn't overridden)? (case is significant)