run WebSpec app from Dos command window got NoClassDefFoundError:com/teamdev/xpcom/ProxyAuthenticationHandler

100 views
Skip to first unread message

sophie

unread,
Feb 12, 2012, 8:10:39 PM2/12/12
to watij
Hi,

I created a simple webspec app:

import org.watij.webspec.dsl.WebSpec;

public class WebSpecTest {

/**
* @param args
*/
public static void main(String[] args) {
WebSpec spec = new WebSpec().mozilla();
spec.open("http://www.google.com");

}

}

and then run within Eclipse, it works fine.
when run from a dos window ( I already put webspec.jar and all jars
under \lib into classpath):
c:\eclipse\wordspace\test\bin> java -classpath %classpath%
WebSpecTest
got the error :
Exception in thread "main" java.lang.NoClassDefFoundError: com/teamdev/
xpcom/PoxyAuthenticationHandl
er
at WebSpecTest.main(WebSpecTest.java:9)
Caused by: java.lang.ClassNotFoundException:
com.teamdev.xpcom.PoxyAuthenticationHandler
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:
301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 1 more

Anyone can help? Thanks in advance.
Reply all
Reply to author
Forward
0 new messages