Unfortunately IKVMC changed its policy on dynamic loading of Java classes, which is why this no longer works.
 
I'd suggest doing what the cited text suggests - converting the JAR to a .NET assembly by using IKVMC to cross-compile it.
 
I think there have been further changes in IKVMC more recently that might allow me to reinstate this functionality - I'll look into it.
 
Michael Kay
http://www.saxonica.com/


From: saxon-help-bounces@lists.sourceforge.net [mailto:saxon-help-bounces@lists.sourceforge.net] On Behalf Of Steve Turner
Sent: 08 January 2008 18:27
To: saxon-help@lists.sourceforge.net
Subject: [saxon] Java Extesions in 9.0 vs 8.7.3

Hello,

 

Silly question…

 

I downloaded Saxon-B yesterday, primarily because I have a need to use C# extensions, a capability that appears not to be available in 8.7.3.  Unfortunately, I seem now to be having a problem using a function defined in a jar file that was written internally.  Looking at the documentation, I see the following difference between 8.7.3 and 9 with respect to java extensions:

 

For 8.7.3:

 

Java extension functions can be used whether you are running on the Java platform or the .NET platform. In both cases, the class (in the form of Java bytecode) must be on the classpath used for dynamic loading. For use on .NET, it is also possible to compile the Java code into a .NET assembly using the IKVMC compiler, in which case it behaves in the same way as an extension function written in any other .NET language and compiled into MSIL: see Writing extension functions under .NET

 

For 9.0

 

Java extension functions can also be used when you are running on the .NET platform, provided the class implementing the function is a standard class in the GNU Classpath library (which covers nearly all the classes defined in the JDK). In other cases, you should compile the Java code into a .NET assembly using the IKVMC compiler, in which case it behaves in the same way as an extension function written in any other .NET language and compiled into CIL: see Writing extension functions under .NET

 

Unfortunately, I only have access to the jar file…is there any way to either use this jar file directly in 9.0 or use my .NET assembly in 8.7.3?

 

 

Thanks,

 

 

Stephen Turner

=======
Notice: This e-mail message, together with any attachments, contains
information of Symyx Technologies, Inc. or any of its affiliates or
subsidiaries that may be confidential, proprietary, copyrighted,
privileged and/or protected work product, and is meant solely for
the intended recipient. If you are not the intended recipient, and
have received this message in error, please contact the sender
immediately, permanently delete the original and any copies of this
email and any attachments thereto.