Note that there are some explanatory texts on larger screens.

plurals
  1. POJUnit-Test started with Ant gives a "ClassNotFoundException"
    text
    copied!<p>This Ant-Target works:</p> <pre><code>&lt;target name="run"&gt; &lt;java jar="dist/FBChatSoft.jar" fork="true"/&gt; &lt;/target&gt; </code></pre> <p>so "dist/FBChatSoft.jar" is the correct path to the jar.</p> <p>But the following target doesn't work. The Path to the *Test.java is also correct.,</p> <pre><code>&lt;target name="junit" depends="jar"&gt; &lt;mkdir dir="junitreport"/&gt; &lt;junit printsummary="yes"&gt; &lt;classpath&gt; &lt;path location="dist/FBChatSoft.jar"/&gt; &lt;/classpath&gt; &lt;formatter type="xml"/&gt; &lt;batchtest fork="yes" todir="junitreport"&gt; &lt;fileset dir="src/fbchatsoft/client/" includes="*Test.java"/&gt; &lt;/batchtest&gt; &lt;/junit&gt; &lt;/target&gt; &lt;target name="junitreport"&gt; &lt;junitreport todir="junitreport"&gt; &lt;fileset dir="junitreport" includes="TEST-*.xml"/&gt; &lt;report todir="junitreport"/&gt; &lt;/junitreport&gt; &lt;/target&gt; </code></pre> <p>In the JUnitReport I can read:</p> <blockquote> <p>PropertiesHelperTest</p> <p>java.lang.ClassNotFoundException: PropertiesHelperTest at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:186)</p> </blockquote> <p>You can find the whole code at: <a href="https://bitbucket.org/michaelkohler/fbchatsoft/src" rel="nofollow">https://bitbucket.org/michaelkohler/fbchatsoft/src</a></p>
 

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