Testing SWT classes with JUnit plugin [message #452754] |
Thu, 13 July 2006 17:43 |
John Sanda Messages: 22 Registered: July 2009 |
Junior Member |
|
|
I am using Eclipse 3.1.2 on Win XP, and I am trying to run a simple unit
test for a class that has dependencies on SWT via the JUnit plugin. I
was getting a LinkageError because initially I had not set the
java.library.path system property. When I went searching the plugins
directory under my Eclipse installation, I discovered that the SWT DLL
files are now packaged in the SWT JAR file. With the DLLs being in the
JAR file, what value do I need to specify for java.library.path?
I next decided to unjar the SWT JAR file and place the DLLs in a temp
directory. I tried setting java.library.path both in the launch
configuration as a program argument (i.e.,
-Djava.library.path=/path/to/DLL/dir) as well as in my test's setUp()
method. Neither approach worked. A friend suggested placing the DLLs in
the working directory. Sure enough, this worked, and I didn't have to
set the java.library.path property. There must be something going on
that I am unaware of because none of this makes much sense.
If this is the wrong place to post, I apologize, and I will be sure to
repost with the appropriate news group. Thanks.
- John
|
|
|
Powered by
FUDForum. Page generated in 0.03721 seconds