for /f "tokens=* delims= " %%a in (plugins.txt) do (
echo %%a
java -cp .;svnkit.jar Test %%a
cd %dotcms_home%
call ant deploy-plugins > test1.txt
FindStr "BUILD SUCCESSFUL" test1.txt
del "test1.txt"
cd C:\dotCMSResults
echo Errorlevel: %ERRORLEVEL%
if %ERRORLEVEL% ==1 (echo ^<tr BGCOLOR=\"#FF0000\"^>^<td^>Build^</td^>^<td^>Fout\!^</td^>^</tr^> >> goedje.html ) else (echo ^<tr BGCOLOR=\"#00FF00\"^>^<td^>Build^</td^>^<td^>Gelukt\!^</td^>^</tr^> >> goedje.html)
cd %dotcms_home%
call ant undeploy-plugins > test.txt
)
Hello, I want to run a Java class in commandline in a while loop. I searched on Google and found a way to do it. But now he is only doing it the first time, the second and third time he said:
Exception in thread "main" java.lang.NoClassDefFoundError: Test
Caused by: java.lang.ClassNotFoundException: Test
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: Test. Program will exit.
I don't know why, esspecialy because he is running the first time correct. Only the second and third time he is going in the loop he gets this error.