简体   繁体   中英

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?

将tools.jar从JDK复制到您的JRE lib文件夹...对我有用。.问题是,它无法找到tools.jar。

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).

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"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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