0
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
)
안녕하세요, while 루프에서 명령 줄에서 Java 클래스를 실행하고 싶습니다. Google에서 검색 한 후이를 수행 할 수있는 방법을 찾았습니다. 하지만 지금 그는 단지 그것을 처음을하고, 두 번째와 세 번째는 그는 말했다 : 그가 올바른 처음 실행 esspecialy 때문에, 왜 모르는while 루프 쉘에서 Java 실행하기
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.
. 그가 두 번째 및 세 번째 시간에만 루프에 들어가면이 오류가 발생합니다. 인해 cd
제표에
동의하는 것이 가장 좋은 원인입니다. 단지 JVM이 JVM을 시작할 때 지정한'Test' 클래스를 찾을 수 없다는 의미입니다. – jefflunt
흠 .. 아직도 작동하지 않지만 java -cp. "C : \ dotCMS Automatic Install \ svnkit.jar" "C : \ dotCMS Automatic Install \ Test"%% – Gynnad
@Gynnad "C : \ dotCMS Automatic Install \ Test"대신 " –