开发者

Running Windows XP batch on Windows 7

I have a batch file which runs on XP:

@echo off
@setlocal 
set CWD=%~dp0
set JYTHON_HOME=%CWD%
set LIB_DIR=%JYTHON_HOME%/lib
java -cp %LIB_DIR% -jar %LIB_DIR%/jython.jar -Djython.home=%CWD%
-Dpython.path=%LIB_DIR%;%CWD%/ext %LIB_DIR%clenotes/clenotes.py %* 
@endlocal

I want to run this file on Windows 7.

EDIT:

When I run it this error occurs:

Exception in thread "main" java.lang.NoClassDefFoundError:
folder\CLENotes\lib Caused by: java.lang.ClassNotFoundException:
folder\CLENotes\lib
    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$A开发者_如何学GoppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)


Actually it is very simple, I needed to change the fowardslashes (/) to backslashes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜