Hi,
I am trying to run Randoop on downloaded projects from SourceForge.
I wrote an ant build file to automate the process.
But its failing with 'NoClassDefFoundError'.
For example:
WARNING: classForName(com.imsmart.main.MMergeTIFF) yielded exception: com/sun/media/jai/codec/SeekableStream
java.lang.NoClassDefFoundError: com/sun/media/jai/codec/SeekableStream
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
....
....
I think it's because the project has dependencies on other libraries which it cannot find.
In the above case, the class 'com.imsmart.main.MMergeTIFF' has dependency on a jar file.
How do I add the directory that has all the jar files in the classpath?
I'd really appreciate if anyone could please me on this.
Thanks,
--Ishtiaque
The ANT build file I use is as below: Please note, 'MyListOfClasses.txt' has all the list of classes, and the *.class files are under '\imsmart' folder.
-------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<project name="RUGRAT build file" default="randoop">
<!-- target: randoop -->
<target name="randoop" >
<java classname="randoop.main.Main" fork = "yes">
<classpath>
<pathelement location="..\..\..\..\..\..\..\RUGRAT-Bipul machine\Rugrat Experiments\Tools\Randoop\randoop.1.3.2.jar"/>
<pathelement path="..\..\imsmart"/>
</classpath>
<jvmarg value="-Xmx30720m"/>
<jvmarg value="-XX:PermSize=1024m"/>
<jvmarg value="-XX:MaxPermSize=1024m"/>
<arg value="gentests" />
<arg value="--classlist=MyListOfClasses.txt" />
<arg value="--output-tests=fail"/>
<arg value="--junit-output-dir=randoop-fail-min"/>
</java>
</target>
</project>
------------------------------------------------------------------------------------------------