开发者

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 tr开发者_StackOverflow中文版y 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?


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

using java.util;


Use -L instead of using -reference.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜