Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using IKVM to convert jar to dll

807569Jun 26 2006 — edited Jul 18 2006
Hello,

I've read a previous post on methods to try and convert a .jar file to .dll so it can be used in the .NET platform for, say, C#. It was suggested that IKVM be used to do so, and I did just that.

However, when trying to incorporate the new files into my C# code, I kept getting a run-time error, and I wasn't even sure where it was coming from (it occured when I tried to create an object though, from the classes in the new dll's)

"Cannot cast object of type 'java.lang.ExceptionInInitializerError' to type 'java.lang.Exception' "

When I tried coding in J#, I get a warning and an error:

Warning 1 Type 'java.lang.Object' is found in more than one imported binaries. Using the one in 'C:\ikvm\ikvm-0.28.0.0\bin\IKVM.GNU.Classpath.dll'

Error 2 Cannot declare type 'java.lang.Object'

So I got rid of IKVM.GNU.Classpath.dll to see what would happen. The compiler told me that it could not find IKVM.GNU.Classpath.dll. Great.

I also tried using jbimp.exe and vjc.exe to try and convert from jar to dll but no success.

JbImp error: Unresolved Constructor 'public void java.lang.Exception(java.lang.Throwable)'

...and when using vjc, I get about 100 of these lines:
some_sdk.jar(1,3): error VJS1078: Unexpected char '\u0003'

Maybe I am not even using the right tools, but any help and/or adivce would be greatly appreciated =)

-Confused Student
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 15 2006
Added on Jun 26 2006
3 comments
1,069 views