automatic testing
automatic testing

Reputation: 41

using evosuite from command line

When I try to use the EvoSuite testing tool from the command line, I get the following error:

Fatal crash on main EvoSuite process. Class using seed 1428172877144. Configuration id : null 
java.lang.RunTimeExceptionConfiguration:Did not manage to automatically find tools.jar. Use –Dtools_jar_location = <path> properly 
    at org.evosuite.runtime.agent.ToolsJarLocator.getLoaderForToolsJar<ToolsJarLocator.java:71> ~[evosuite-0.1.1.jar:na] 
    at org.evosuite.Evosuite.parseCommandLine<Evosuite.java:152> ~[evosuite-0.1.1.jar:na] 
    at org.evosuite.Evosuite.main<Evosuite.java:304> ~[evosuite-0.1.1.jar:na]

Could someone help me with this?

Upvotes: 0

Views: 3595

Answers (3)

thechane
thechane

Reputation: 359

Make sure you use your JDK to run Evosuite, not the JRE. That may mean either going into the JDK /bin dir and running from there or fully quantifying the executable java binary file when you run (JDK..../bin/java.exe on windows for example).

Upvotes: 2

Rajesh Idimannan
Rajesh Idimannan

Reputation: 11

Copy the tools.jar from JDK to your JRE lib folder...it worked for me..The problem, its not able to find the tools.jar.

Upvotes: 1

arcuri82
arcuri82

Reputation: 970

As pointed out by Makoto, you need to use a -D option. Note: no space between variable name and assigned value, ie -Dx=v is OK, whereas -Dx = v is wrong. So:

java -jar evosuite-0.1.1.jar -Dtools_jar_location="C:\Program Files\Java\jdk1.7.0_75\lib"

Upvotes: 0

Related Questions