Having Problems using IKVM in Mono 3.2.3
Michael Larson <[email protected]>
| Newsgroups | gmane.comp.java.ikvm.devel |
|---|---|
| Message-ID | <CAPz=hZGiVjrJAZZs7V-UOtmOVeY2hHhGYtmdGzLqMtjspSqw4Q@mail.gmail.com> |
Hello Everyone,
Currently I am loading a jar file at runtime in a simple C# application and
everything works great. When I try to run my test app in Mono I get the
following error:
Type 0x1d not handled in custom attr array decoding
I have no idea why Mono is throwing this error and why it does not work.
Here is my C# source code:
using System;using System.Collections.Generic;
namespace TestAppIKVMMONO
{
class Program
{
static void Main(string[] args)
{
List<java.net.URL> jarFileUrls = new List<java.net.URL>();
jarFileUrls.Add(new java.net.URL("file:"+
Environment.CurrentDirectory+"\\Hello.jar"));
var classLoader =
java.net.URLClassLoader.newInstance(jarFileUrls.ToArray());
var helloClass =
java.lang.Class.forName("HelloWorld.Hello", true, classLoader);
object obj = helloClass.newInstance();
obj.GetType().GetMethod("PrintHello").Invoke(obj, null);
}
}
}
And Here is my Java code that I am calling from the C# app:
package HelloWorld;
public class Hello {
public void PrintHelloWorld() {
System.out.println("Hello From Java!!");
}
}
Any help would be most appeciated!
Regards,
Michael
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Ikvm-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ikvm-developers