Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Testing SWT classes with JUnit plugin
Testing SWT classes with JUnit plugin [message #452754] Thu, 13 July 2006 17:43
John Sanda is currently offline John SandaFriend
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
Previous Topic:Title font of dialog
Next Topic:How to get it work? Buddy Loading and start(BundleContext text)
Goto Forum:
  


Current Time: Sat Oct 05 09:59:45 GMT 2024

Powered by FUDForum. Page generated in 0.03721 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top