简体   繁体   English

在 ONE 模拟器上使用 VSC 编译问题

[英]Compiling Issue using VSC on ONE Simulator

I just install ONE Simulator on my pc with updated JDK and JRE 1.8.0_321 using Visual Studio Code text editor.我只是使用 Visual Studio Code 文本编辑器在我的电脑上安装了一个带有更新的 JDK 和 JRE 1.8.0_321 的模拟器。 When I compile the main file, here is the problem mentioned:当我编译主文件时,这里是提到的问题:

Exception in thread "main" java.lang.Error: Unresolved compilation problems:线程“main”中的异常 java.lang.Error:未解决的编译问题:

    Settings cannot be resolved
    DTNSimTextUI cannot be resolved to a type
    Settings cannot be resolved
    DTNSimGUI cannot be resolved to a type

    at core.DTNSim.main(DTNSim.java:83)

May I know, what is the problem here and how can I solve this problem?我可以知道,这里有什么问题,我该如何解决这个问题?

Thanks谢谢

It looks like the DTNSimTextUI and DTNSimGUI class is not known at compile time.看起来DTNSimTextUIDTNSimGUI class 在编译时是未知的。 You need to import the related class.您需要导入相关的class。

Like this:像这样:

import package1.package2.DTNSimTextUI

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM