Windows10 / Java JDK 12上的JPF构建/编译错误

时间:2019-05-06 16:25:58

标签: java gradle model-checking jpf

我正在尝试在Windows 10计算机上构建Jpf源代码。我已按照说明进行操作,并克隆了jpf-core的master分支。我已经安装了jdk 12(最新版本)。现在,我正在运行源代码中给出的gradlew.bat文件,但它给了我以下错误:

============================

> Task :compileJava
E:\Project\jpf-core\src\main\gov\nasa\jpf\vm\HashedAllocationContext.java:21: error: cannot find symbol
import sun.misc.SharedSecrets;
               ^
  symbol:   class SharedSecrets
  location: package sun.misc
E:\MS\CS5615 Intro to Program Analysis\Project\jpf-core\src\main\gov\nasa\jpf\vm\HashedAllocationContext.java:22: error: cannot find symbol
import sun.misc.JavaLangAccess;
               ^
  symbol:   class JavaLangAccess
  location: package sun.misc
E:\Project\jpf-core\src\main\gov\nasa\jpf\vm\HashedAllocationContext.java:85: error: cannot find symbol
   static final JavaLangAccess JLA = SharedSecrets.getJavaLangAccess();
                ^
  symbol:   class JavaLangAccess
  location: class HashedAllocationContext
E:\Project\jpf-core\src\main\gov\nasa\jpf\vm\HashedAllocationContext.java:85: error: cannot find symbol
   static final JavaLangAccess JLA = SharedSecrets.getJavaLangAccess();
                                     ^
  symbol:   variable SharedSecrets
  location: class HashedAllocationContext
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors

============================

我无法构建它。关于sun.misc库,有一些我无法理解的事情。我是java的新手,我必须在一些示例上运行jpf。任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:0)

好的,所以我为Windows安装了jdk 8u212,并将java_home环境变量重置为新的jdk和JPF编译。 (但有一些警告)