Search code examples
javawindows-phone-7dllcross-compilingikvm

Can a Java library compiled to a DLL be used in developing a WP7 application?


Is it possible to compile Java code into a DLL to be used in a Windows Phone 7 application?

I know it's possible to compile Java code into a jar and run IKVM.NET to convert that to a .NET DLL, but can that (.NET) DLL be used in a Windows Phone 7 application?

Thanks!


Solution

  • There may be ways of doing it, but it would be painful - many of the ports of the standard library classes won't be viable within WP7. (Even a lot of existing .NET code won't work under WP7 without tweaking - it depends on what you're trying to do.)

    You'd be much better off either finding an existing port of whatever you're trying to use, or porting the Java code yourself. You'll end up with much more idiomatic .NET code that way, too.