UnsatisfiedLinkError, Access Denied and Parallels

Hi all,

I'm trying to run Jawin in Eclipse. Knowing that the program needs to find the file jawin.dll, I have added -Djava.library.path=c:\sources\jawin-2.0-alpha1\bin

to the Arguments field in my run configurations.

With this, I still get the error Exception in thread"main" java.lang.UnsatisfiedLinkError: no jawin in java.library.path

Reading around a little, I find that I should be able to load this from within the code itself, using System.load("C:\\sources\\jawin-2.0-alpha1\\bin");

This now give me the error Exception in thread"main" java.lang.UnsatisfiedLinkError: C:\sources\jawin-2.0-alpha1\bin: Access is denied

at java.lang.ClassLoader$NativeLibrary.load(Native Method)

Reading around a little more, I find that this occurs when the .dll file is set to read-only. Clicking the 'properties' menu on the file, read-only is NOT checked. Read-only IS checked (and greyed-out, though temporarily changable) in each of the folders leading up to the file, but as far as I have understood, these don't really mean anything. Regardless, I can't seem to permenantly change them.

I've read that people can sometimes have problems accessing .dlls if they are on networked drives. The only thing I can think that MIGHT have an affect is that I am running Windows XP on Mac Parallels. I can't really see why this should matter, though.

Any thoughts or hints on how I can get this working would be greatly appreciated!

Thanks,

Sam

[1588 byte] By [Asbestosa] at [2007-11-26 22:27:19]
# 1

> -Djava.library.path=c:\sources\jawin-2.0-alpha1\bin

Myself I wouldn't be confident that that would work. You can verify that setting via System.getProperties() (or whatever it is called.)

> System.load("C:\\sources\\jawin-2.0-alpha1\\bin");

No.

That is intended to load a shared library file.

What you provided there is a directory, not a file.

The exception is telling you that it isn't loadable (because it isn't a file.)

You can load the file yourself. That might or might not work depending on how the java library is written.You can use load() or loadLibrary() to try this. If an exception is thrown then it means you didn't provide the correct argument to the method.

Otherwise....

1. Verify the location of the dll.

2. Open a console window.

3. ADD to the env var PATH variable the above verified directory to the BEGINNING.

4. Run you java application from the command line in the console window.

If both of the two suggestions above fail then it is likely that there is something wrong with the dll that you are attempting to load. Perhaps it simply will not run in your environment. Or maybe it just won't run in XP.

jschella at 2007-7-10 11:29:33 > top of Java-index,Java HotSpot Virtual Machine,Specifications...