Note that there are some explanatory texts on larger screens.

plurals
  1. POJunit classpath in ant: problems with dirset
    primarykey
    data
    text
    <p>I'm getting troubles trying to use </p> <pre><code>&lt;dirsets&gt; </code></pre> <p>in my junit ant. This is the snippet of the classpath.</p> <pre><code>&lt;target name="myTests" &gt; &lt;junit haltonerror="true" haltonfailure="true" fork="true"&gt; &lt;classpath&gt; &lt;dirset dir="/my/absolute/root/path/where/I/keep/compiled/classes"&gt; &lt;include name="com/mycompany/mytests"/&gt; &lt;/dirset&gt; &lt;pathelement location="my/path/to/jars/myjar1.jar" /&gt; &lt;pathelement location="my/path/to/jars/myjar2.jar" /&gt; &lt;!-- and so on --&gt; &lt;/classpath&gt; &lt;test name="com.mycompany.mytests.MyFirstTest" outfile="${dir.report.test}/report_MyFirstTest"&gt; &lt;formatter type="xml" /&gt; &lt;/test&gt; &lt;/junit&gt; &lt;/target&gt; </code></pre> <p>when I launch the test, after having successfully compiled all the code, ant complains:</p> <pre><code>java.lang.ClassNotFoundException: com.mycompany.mytests.MyFirstTest at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) </code></pre> <p>I tried with absolute, relative paths and it never works. My classpath consists on many jars specified with many and that that is never recognized. Where is my fault?</p> <p>thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload