Upgrading Applications That Use Custom Class Loaders
The document is archived and information here might be outdated

Upgrading Applications That Use Custom Class Loaders

Visual Studio 2005

There is no ClassLoader support for converting bytecode into a Class object.

The following methods are not supported:

  • ClassLoader.defineClass

  • ClassLoader.resolveClass

These methods throw com.ms.vjsharp.MethodNotSupportedException in Visual J#.

Custom class loaders extend java.lang.ClassLoader and override the loadClass method for their specific implementation. If these loadClass implementations call either or both of the above two ClassLoader methods, they need to be modified to load managed assemblies and then look for the specified classes therein.

As ClassLoader.defineClass and ClassLoader.resolveClass are no longer supported, Class.getClassLoader always returns null, even when using a custom class loader.

Custom class loaders are not recommended for developers using Visual J#. Instead, use .NET Framework APIs for locating and loading classes from Microsoft intermediate language (MSIL) assemblies.

Show:
© 2016 Microsoft