when I run: java %JAVA_OPTS% -cp %JARS%(jar_files) com.android.c开发者_高级运维ts.TestHost %CONFIG%(xml path) %* %DDCONFIG% in cmd promt im getting following error, please anybody suggest solution for this error
Exception in thread "main" java.lang.NoClassDefFoundError: and Caused by: java.lang.ClassNotFoundException: and 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: and. Program will exit.
Package com.android.cts.TestHost is exists in Jar file.which
I had the same issue by using cygwin
I found the solution on this blog
You just have to do the modification of those two line in the script startcts :
JARS=`cygpath -w -p ${CTS_LIB}:${DDM_LIB}:${JUNIT_LIB}:${HOSTTEST_LIB}`
java ${JAVA_OPTS} -cp ${JARS} com.android.cts.TestHost `cygpath -w ${CONFIG}` "$@" ${DDCONFIG}
Then I was able to have the CTS prompt
精彩评论