IKVM Help - Cannot find class when creating dll
This is a follow up to this post where i have discovered how to interact with dll files that were generated from .jars via IKVM How to call a dll file from c#
The application i have created in java works as a stand alone project. When i try and generate the dll file though i get ClassNotFound errors with the lib files i imported in to the project. To import (in eclipse)i created a lib folder, dumped the jar files inside, selected all of them and then right clicked -> add to build path.
Is there a fundamental step i am 开发者_运维知识库missing here or is it not possible to generate a dll file from a .jar that uses library files inside?
Thanks, and sorry for the confusion
It look like that you have mix some things. With IKVM there are 2 modes:
Compiling to .NET on the fly. You use the ikvm.exe and it like a java.exe. If you want use it in eclipse then you need to rename ikvm.exe to java.exe. In this mode you can work only with jar files.
Compiling to .NET on building. You use the ikvmc.exe to compile your your jar files to .NET dlls or a .NET exe. This dll can you use only with Visual Studio and not with Eclipse. It is not possible to import dll files in Eclipse. If you want access an existing .NET dll in Eclipse then you need to create stub jar files with ikvmstub.exe. If you do it you can not run it anymore with the Java from Oracle.
精彩评论