Error loading DLL after using VE [message #126095] |
Wed, 14 June 2006 11:33  |
Eclipse User |
|
|
|
Recently I found one of my program could not start. It generates the
following message:
java.lang.UnsatisfiedLinkError: no xxxx.dll in java.library.path
I add some lines to see what's wrong with the path. The result is:
java.library.path =
F:\workspace\.metadata\.plugins\org.eclipse.ve.java.core\.ca che\.libCache\741083792
It seems that for some reason that VE has changed this path. OK, I can
put the original DLL under this path to solve the problem, but I don't
like this way -- It looks like a random generated path number, but my
DLL is refered by many projects. I could not find any configuration to
change this. If I add -Djava.library.path switch to run parameters, then
the program cann't start,either (perhaps because SWT dll is located in
this path).
Any way to get rid of this strange behavior?
|
|
|
Re: Error loading DLL after using VE [message #126137 is a reply to message #126095] |
Wed, 14 June 2006 13:54   |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
That's a problem with the JDT Launcher. It says that if you supply a
library path it will not provide the appropriate default library path,
which is how the SWT.dll is provided, through the default.
This is for Eclipse 3.2, (I don't if this is possible in 3.1), but they
have now provided an official way to do this without actually requiring
you to touch your launch configuration and put in a -Djava....
If the dll goes along with a jar (or external jar) that you've added to
your project's classpath, then go to the build path properties for your
project, go to the "Libraries" tab, select your jar, and expand the +
sign, select "Native Library Location:" and hit the Edit... button. This
will allow you to point to a directory containing your dll that goes
with that jar.
If the dll goes along with the source code in your project, then do the
same thing as above except select the "Source" tab, expand the source
folder, and Native Library... just as above.
This way no matter how you launch the code all of the dll paths will be
picked up and merged together to form the java.library.path for you
automatically. You don't need to update each launch configuration by hand.
--
Thanks,
Rich Kulp
|
|
|
Re: Error loading DLL after using VE [message #126215 is a reply to message #126137] |
Thu, 15 June 2006 07:21  |
Eclipse User |
|
|
|
OK! It works. thank you for your advise.
Rich Kulp 写道:
> That's a problem with the JDT Launcher. It says that if you supply a
> library path it will not provide the appropriate default library path,
> which is how the SWT.dll is provided, through the default.
> ...
|
|
|
Re: Error loading DLL after using VE [message #613342 is a reply to message #126095] |
Wed, 14 June 2006 13:54  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
That's a problem with the JDT Launcher. It says that if you supply a
library path it will not provide the appropriate default library path,
which is how the SWT.dll is provided, through the default.
This is for Eclipse 3.2, (I don't if this is possible in 3.1), but they
have now provided an official way to do this without actually requiring
you to touch your launch configuration and put in a -Djava....
If the dll goes along with a jar (or external jar) that you've added to
your project's classpath, then go to the build path properties for your
project, go to the "Libraries" tab, select your jar, and expand the +
sign, select "Native Library Location:" and hit the Edit... button. This
will allow you to point to a directory containing your dll that goes
with that jar.
If the dll goes along with the source code in your project, then do the
same thing as above except select the "Source" tab, expand the source
folder, and Native Library... just as above.
This way no matter how you launch the code all of the dll paths will be
picked up and merged together to form the java.library.path for you
automatically. You don't need to update each launch configuration by hand.
--
Thanks,
Rich Kulp
|
|
|
Re: Error loading DLL after using VE [message #613348 is a reply to message #126137] |
Thu, 15 June 2006 07:21  |
Eclipse User |
|
|
|
OK! It works. thank you for your advise.
Rich Kulp 写道:
> That's a problem with the JDT Launcher. It says that if you supply a
> library path it will not provide the appropriate default library path,
> which is how the SWT.dll is provided, through the default.
> ...
|
|
|
Powered by
FUDForum. Page generated in 0.07499 seconds