ikvm
ikvm copied to clipboard
Where is addBootClassPathAssemby of ikvm.runtime.Startup now?
https://sourceforge.net/p/ikvm/wiki/ClassLoader/#bootclasspathassemby documents e.g. ikvm.runtime.Startup.addBootClassPathAssemby(Assembly.Load("YourDll"));
and I think both the original 8.1 and the current 8.2.1 support that (https://github.com/ikvm-revived/ikvm/blob/8.2.1/src/IKVM.Runtime/Java/Externs/ikvm/runtime/Startup.cs).
In the current development branch I don't find Startup. Is the method addBootClassPathAssemby
available somewhere else?
I has helped me in the past to explicitly load some assembly.
Hmm. It isn't. Got lost in the shuffle of rewriting the launcher code.
Wonder what the best place for it to actually be is. Putting it on Startup seems a bit odd. I'd move it to the new Launcher, but that seems odd too.
To those thinking about long term design: having to do this is kinda dumb. The classloader hierarchy should terminate in a loader that resolves types from every available assembly in the .NET application. Basically, at the top, it should delegate to .NET to resolve .NET assemblies. AppDomain for Framework, DependencyContext for Core.
Oh, I will point something out.
If you use the AppDomainAssemblyClassLoader on your DLL, it will do what I just described. I altered that a few releases ago to resolve from the AppDomain or current AssemblyLoadContext.
IKVM.Maven.Sdk uses it by default so everything can see everything else.
Added Startup.addBootClassPathAssembly back. But only the one that is correctly spelled.
fixed by 2ceec0eed6923b879726c973fab2453210657e64