0

我正在使用 Visual Studio 2010。有一个命名空间“Using java.lang;” 在项目中,它显示错误

“找不到类型或命名空间名称‘java’”。

我该怎么办这个错误。必须安装任何软件包吗?

4

2 回答 2

2

得到解决方案。我没有添加参考。在解决方案资源管理器中右键单击项目 -> 属性页 -> 参考 -> vjslib -> 添加参考 -> 再次构建项目。

于 2013-05-23T04:36:49.677 回答
1

The namespace after a using directive has to exist in the current project or in any referenced assembly in order to be recognized by the compiler.

Perhaps it would help if you could see what classes from the java.lang namespace are used in your project. Are there any classes in the project that give the "are you missing a using directive or assembly reference?" error?

When you search the web for "java.lang C#" and "java.lang .NET" you might find libraries like IKVM.

And yes, this is why documentation is important. Ask the creator of the project.

于 2013-05-22T09:01:42.093 回答