尝试基于 ChronicleMap API 执行 myApp:
java -jar myApp-00.00.01-SNAPSHOT-jar-with-dependencies.jar
并得到例外。
Exception in thread "main" java.lang.AssertionError: java.lang.ClassNotFoundException: com.sun.tools.javac.api.JavacTool
at net.openhft.chronicle.values.CompilerUtils.reset(CompilerUtils.java:62)
at net.openhft.chronicle.values.CompilerUtils.<clinit>(CompilerUtils.java:51)
at net.openhft.chronicle.values.ValueModel.createClass(ValueModel.java:348)
at net.openhft.chronicle.values.ValueModel.createHeapClass(ValueModel.java:327)
at net.openhft.chronicle.values.ValueModel.heapClass(ValueModel.java:317)
at net.openhft.chronicle.values.Values.heapClassFor(Values.java:68)
at net.openhft.chronicle.values.Values.newHeapInstance(Values.java:37)
at com.twi.lib.ev.ipc.VTORId.<clinit>(VTORId.java:189)
at com.twi.lib.ev.ipc.Ipc.initialize(Ipc.java:294)
at com.twi.lib.ev.base.Preferences.areRequiredPreferencesSet(Preferences.java:356)
at com.twi.lib.ev.base.ApiEv.autoinitialize(ApiEv.java:48)
at com.twi.demo.ev_examples.Main.main(Main.java:116)
Caused by: java.lang.ClassNotFoundException: com.sun.tools.javac.api.JavacTool
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at net.openhft.chronicle.values.CompilerUtils.reset(CompilerUtils.java:58)
... 11 more
这是我的配置:
安装操作系统:Windows 10
已安装 Java:JDK 1.8.0_131
Java 路径:C:\Program Files\Java\jre1.8.0_131\bin\javaw.exe
ChronicleMaps 测试:3.10 - 3.13 - 所有这些版本的相同问题
MyApp 在 Netbeans 8.2 下运行良好,但如果尝试在命令窗口和命令中运行,总是会出现此异常:
java -jar myApp-00.00.01-SNAPSHOT-jar-with-dependencies.jar
怎么了?
缺少 jar 库 JavacTool ?兼容性?编年史地图中的错误?
感谢您为使用命令运行 myApp 提供的任何输入:
java -jar myApp.jar