I'm having trouble getting Watij running on my machine. I copied the
DLL to my System32 folder, and put the path to the JAR in my
CLASSPATH. I wrote a simple program to test it out:
import
watij.runtime.ie.IE;
import static watij.finders.SymbolFactory.*;
public class GoogleTest {
public static void main(String[] args) {
IE ie = new IE();
try {
ie.start("
http://www.google.com");
ie.textField(name,"q").set("Watij");
ie.button("Google Search").click();
} catch (Exception e) { System.out.println("An exception was
found"); }
}
}
It compiles fine, but when run, I get the following:
Exception in thread "main" java.lang.NoClassDefFoundError: watij/
runtime/ie/IE
at GoogleTest.main(GoogleTest.java:6)
Caused by: java.lang.ClassNotFoundException:
watij.runtime.ie.IE
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)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 1 more
Any ideas on what I'm doing wrong?