Monday, July 1, 2013

Convert from jar to dll

Nowadays, development is very eased from community.
We can easily re-use our code between different platforms in so many ways, gaining time, money and above all... today have multiple skills is not so as useful as before.

By the way, I recently had necessity to bring some java code to .NET runtimes.
No difficulties with IKVM.NET !

If you follow these steps you can convert from JAR to DLL or even from Runnable JAR to EXE!

  • Download IKVM.NET from site ( you need to install JDK and its environment variable JAVA_HOME)
  • Open CMD
  • Go to /bin Folder and type:

    ikvmc -out:output.dll input.jar

    ikvmc runnableJar.jar

You will notice awesome results!!

If you create a DLL, probably you need to import some IKVM assemblies into your project :

  • IKVM.OpenJDK.Core (almost certainly)
  • IKVM.Runtime
  • IKVM.Reflection
  • .... see build error :)
IKVM is more than this, you can find more info at .

However i failed one of my experimental mission because I could not use generated DLL in a Windows Phone Project...

Waiting for news :)

No comments:

Post a Comment