Search code examples
c#javamonoikvm

Problem using Java standard library in C# with IKVM


I'm trying to use java.util.List in a C# file. I have IKVM 0.40. I try to use the java.util namespace like this

using IKVM.OpenJDK.Util;

and compile the file (test.cs) with Mono like this

mcs -reference:/path/to/IKVM.OpenJDK.Util.dll,path/to/IKVM.OpenJDK.Core.dll,path/to/IKVM.Runtime.dll test.cs

but I get the following error

The type or namespace name `OpenJDK' does not exist in the namespace `IKVM'.

What is wrong?


Solution

  • The namespace is java.util that you need to use:

    using java.util;