ERROR EvoSuite - Fatal crash on main EvoSuite process

2.2k Views Asked by At

I'm getting the following error when I try to run EvoSuite. I even provided the complete path to jdk but still the error is not resolved. 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]
1

There are 1 best solutions below

2
On BEST ANSWER

I am not sure if Evosuite works with any other version of JDK except 8. The Evosuite beginner's tutorial states:

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.

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:

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? I had a similar problem and I resolved it by setting the module SDK to 1.8 on my IntelliJ project.