简体   繁体   English

错误 EvoSuite - EvoSuite 主进程发生致命崩溃

[英]ERROR EvoSuite - Fatal crash on main EvoSuite process

I'm getting the following error when I try to run EvoSuite.当我尝试运行 EvoSuite 时出现以下错误。 I even provided the complete path to jdk but still the error is not resolved.我什至提供了 jdk 的完整路径,但错误仍未解决。 Please help me out.请帮帮我。

C:\Users\XYZ\Documents\Tutorial_Stack>java -jar evosuite-1.0.6.jar -Dtools_jar_location="C:\Program Files\Java\jdk-11\lib"
[MASTER] 21:56:45.409 [main] ERROR EvoSuite - Fatal crash on main EvoSuite process. Class  using seed 1541559405405. Configuration id : null
java.lang.RuntimeException: Did not manage to automatically find tools.jar. Use -Dtools_jar_location=<path> property
        at org.evosuite.runtime.agent.ToolsJarLocator.getLoaderForToolsJar(ToolsJarLocator.java:105) ~[evosuite-1.0.6.jar:1.0.6]
        at org.evosuite.classpath.ClassPathHacker.initializeToolJar(ClassPathHacker.java:58) ~[evosuite-1.0.6.jar:1.0.6]
        at org.evosuite.EvoSuite.parseCommandLine(EvoSuite.java:156) ~[evosuite-1.0.6.jar:1.0.6]
        at org.evosuite.EvoSuite.main(EvoSuite.java:302) ~[evosuite-1.0.6.jar:1.0.6]

I am not sure if Evosuite works with any other version of JDK except 8. The Evosuite beginner's tutorial states:我不确定 Evosuite 是否适用于 JDK 8 以外的任何其他版本。 Evosuite 初学者教程指出:

The first prerequisite for this tutorial is a working Java 8 JDK installation and a command-line prompt, with java and javac on the classpath.本教程的第一个先决条件是运行 Java 8 JDK 安装和命令行提示符,在类路径中包含 java 和 javac。

To check if you are set up, fire up a terminal and try the following:要检查您是否已设置,请启动终端并尝试以下操作:

javac -version

If you have JDK installed, you will see an output similar to the following:如果您安装了 JDK,您将看到类似于以下内容的输出:

javac 1.8.0_51

Note: the last part of the version could be different注意:版本的最后一部分可能会有所不同

Another question: Are you using any IDE for this like IntelliJ or Eclipse?另一个问题:您是否为此使用任何 IDE,例如 IntelliJ 或 Eclipse? I had a similar problem and I resolved it by setting the module SDK to 1.8 on my IntelliJ project.我有一个类似的问题,我通过在我的 IntelliJ 项目上将模块 SDK 设置为 1.8 来解决它。

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

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