java.lang.NoClassDefFoundError: com/jniwrapper/win32/ie/WebBrowser

180 views
Skip to first unread message

emk...@gmail.com

unread,
Apr 16, 2007, 2:38:51 PM4/16/07
to watij
Hello,
I am very excited to use Waitj, however it will not work in an IDE. I
have tried netbeans and IntelliJ. It works fine in the Beanshell, but
in IntelliJ the JNI class cannot be found. Simply calling IE()
constructor gives me:
java.lang.NoClassDefFoundError: com/jniwrapper/win32/ie/WebBrowser

I have jniwrap.dll in my system32 folder. I am using watij 3.1.0
direct from the website. I have added the jar and lib folders to my
module. Maybe I am not setting up IntelliJ correctly, as I have never
used it, but here is the classpath it is using, which looks correct:
"C:\Program Files\Java\jdk1.5.0_11\bin\java" -Didea.launcher.port=7541
"-Didea.launcher.bin.path=C:\Program Files\IntelliJ IDEA 6.0\bin" -
Dfile.encoding=windows-1252 -classpath "C:\Program Files\Java
\jdk1.5.0_11\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.5.0_11\jre
\lib\deploy.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\javaws.jar;C:
\Program Files\Java\jdk1.5.0_11\jre\lib\jce.jar;C:\Program Files\Java
\jdk1.5.0_11\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib
\plugin.jar;C:\Program Files\Java\jdk1.5.0_11\jre\lib\rt.jar;C:
\Program Files\Java\jdk1.5.0_11\jre\lib\ext\dnsns.jar;C:\Program Files
\Java\jdk1.5.0_11\jre\lib\ext\localedata.jar;C:\Program Files\Java
\jdk1.5.0_11\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java
\jdk1.5.0_11\jre\lib\ext\sunpkcs11.jar;C:\watij\watij.jar;C:\watij
\lib;C:\Documents and Settings\ekravitz\IdeaProjects\WatijAlpha\classes
\production\WatijAlpha;C:\watij\junit-4.3.1.jar;C:\Program Files
\IntelliJ IDEA 6.0\lib\idea_rt.jar"
com.intellij.rt.execution.application.AppMain
com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 WatijAlpha

I have tried both JDK 1.5 and 1.6, so I don't think thats it either.
Any help would be very appreciated, as I really want to start writing
watij test cases!

Ben

unread,
Apr 16, 2007, 2:51:14 PM4/16/07
to watij
Hey,

I don't see jexplorer-1.*.jar or any other of the JExplorer-jars
within the specified class path argument.
com.jniwrapper.win32.ie.WebBrowser is part of jexplorer-1.*.jar, but
you will have to include comfy, jniwrap, mshtml and winpack as well.

Hope it helps!

With kind regards
Ben Schulz

emk...@gmail.com

unread,
Apr 16, 2007, 3:55:52 PM4/16/07
to watij
How would I do that? I just added Watij.jar and watij/lib to the
libraries section of my IntelliJ project, and that classpath was
generated automatically. Do I need to download anything additional?
Thanks for the help!
-Ethan

emk...@gmail.com

unread,
Apr 16, 2007, 4:01:19 PM4/16/07
to watij
After looking again, all those jars are listed in my project explorer
<a href="http://www.photolava.com/view/1bt8.html"><img src="http://
img104.mytextgraphics.com/photolava/2007/04/16/project-465xj47ug.jpg"
alt="Free Photo hosting by PhotoLava.com" border="0"/></a>

The classpath contains watij/lib, shouldn't that include all jars
within it?

Alejandro Soini

unread,
Apr 16, 2007, 4:11:04 PM4/16/07
to wa...@googlegroups.com
i have no idea about intellij (i use eclipse), but you might want to try adding each individual jar explicitly, as opposed to a directory.

> > > \production\WatijAlpha;C:\watij\junit- 4.3.1.jar;C:\Program Files

emk...@gmail.com

unread,
Apr 18, 2007, 12:10:36 AM4/18/07
to watij
Well I don't really think it has to do with intellij vs eclipse so
much as it has to do with java. If the classpath has watij/lib in it,
does java automatically look at all jars in the folder? Anyways, I
will try adding all the jars manually and report back tomorrow.

> > > > > \production\WatijAlpha;C:\watij\junit-4.3.1.jar;C:\Program Files

emk...@gmail.com

unread,
Apr 18, 2007, 2:05:54 PM4/18/07
to watij
I added all the jars manually, instead of adding the folder. It works
now. Thanks everyone.
Reply all
Reply to author
Forward
0 new messages