开发者

Problem using Java standard library in C# with IKVM

开发者 https://www.devze.com 2023-03-22 04:39 出处:网络
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

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

精彩评论

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