Replies: 1 comment
-
|
Yes. First, though, the JAR files produced by ikvmstub are just that: stubs. They contain no implementation code. They are only suitable for using javac to compile against. If you want to add an assembly to the classpath of java.exe, you use -Xreference. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I created a simple sample C# library as follows:
Using
csc.exein Visual Studio 2022, I generatedCSTest.dllas follows:Then, using IKVM tools, I created Java stub files for both
mscorlib.dllandCSTest.dllas shown:Next, I created and compiled the following Java source code:
I compiled the Java source using the following command:
Then, I attempted to run it using IKVM's
java.exe:However, the following error occurred:
After consulting the IKVM documentation, I used
ikvmcto convertCSTestMain.classto a .NET assembly, adjusted the paths and directories, and ran theCSTestMain.exegenerated byikvmc. It worked successfully as follows:Question:
Is it impossible to run .NET DLLs linked via Java stubs using IKVM's
java.exe?I even tried adding the path to the DLL in the
PATH, but the same error persists.Beta Was this translation helpful? Give feedback.
All reactions