1

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]
Matt
  • 968
  • 2
  • 13
  • 22

1 Answers1

0

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.

Gakuo
  • 845
  • 6
  • 26
  • The error is now resolved after I installed JAVA 8 JDK. Thanks for your reply. @Gakuo : I'm using Eclipse to write the JAVA programs for my project. I was getting familiarize with EvoSuite by doing the tutorials on their website. Now im getting errors when I compile the files (Stack_ESTest.java and Stack_ESTest_scaffolding.java) produced by EvoSuite. I used this command, javac evosuite-tests/triangle/*.java – syed omar azam Nov 08 '18 at 00:12
  • You can ask another question with the error message you are getting and add the link to the new question in the next comment. – Gakuo Nov 09 '18 at 01:02