我正在尝试将一个名为 Contiki-NG 的程序安装到 Windows 10 工作站上 VMware 中的 Ubuntu 版本上。在此过程中,我需要构建一个名为 Cooja 的应用程序。我得到以下结果:
icook@ubuntu:~/contiki-ng/tools/cooja$ sudo ant run
Buildfile: /home/icook/contiki-ng/tools/cooja/build.xml
init:
compile:
[mkdir] Created dir: /home/icook/contiki-ng/tools/cooja/build
[javac] Compiling 170 source files to /home/icook/contiki-ng/tools/cooja/build
[javac] /home/icook/contiki-ng/tools/cooja/java/org/contikios/cooja/contikimote/interfaces/ContikiEEPROM.java:41: error: package javax.xml.bind does not exist
[javac] import javax.xml.bind.DatatypeConverter;
[javac] ^
[javac] /home/icook/contiki-ng/tools/cooja/java/org/contikios/cooja/contikimote/interfaces/ContikiEEPROM.java:281: error: cannot find symbol
[javac] element.setText(DatatypeConverter.printBase64Binary(getEEPROMData()));
[javac] ^
[javac] symbol: variable DatatypeConverter
[javac] location: class ContikiEEPROM
[javac] /home/icook/contiki-ng/tools/cooja/java/org/contikios/cooja/contikimote/interfaces/ContikiEEPROM.java:290: error: cannot find symbol
[javac] setEEPROMData(DatatypeConverter.parseBase64Binary(element.getText()));
[javac] ^
[javac] symbol: variable DatatypeConverter
[javac] location: class ContikiEEPROM
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 3 errors
BUILD FAILED
/home/icook/contiki-ng/tools/cooja/build.xml:77: Compile failed; see the compiler error output for details.
Total time: 4 seconds
我在网上查了一下,Stackexchange有以下内容:https://stackoverflow.com/questions/43574426/how-to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception-in-j
在我拥有的 Java 11 中,这表明我需要在类或模块路径中包含我自己的 Java EE API 副本。我的问题是,类或模块路径在哪里?如何添加依赖项?还有另外两个错误“找不到符号”,对如何解决这些错误有什么想法吗?
感谢大家。