Newbie: Why 'UnsatisfiedLinkError & Access is denied' over network drive?

Discussion in 'Java' started by Rachel, Jul 18, 2003.

  1. Rachel

    Rachel Guest

    Hi,

    I have 2 jar files (packageA.jar & packageB.jar) + 1 DLL (used by
    packageB.jar) in the follow hierarchy:

    folder1/app/packageA.jar (with main-class packA.classA)
    folder1/app/dllC.DLL
    folder1/lib/packageB.jar (classes packaged in packB)

    folder1/app/run.bat has the following:
    java -Djava.library.path=. -classpath
    ...;.;../lib/packageB.jar;../app/packageA.jar packA.classA

    1. When folder 1 is located in a local drive, the program runs successfully.

    2. But when folder1 is located in a network drive, I get the following
    ERROR:
    Z:\folder1\app>java -Djava.library.path=. -classpath
    ...;.;../lib/packageB.jar;../app/packageA.jar packA.classA
    java.lang.UnsatisfiedLinkError: Z:\folder1\app\dllC.DLL: Access is denied:
    Check that native library dllC is in proper directory
    Exception in thread "main" java.lang.UnsatisfiedLinkError: GetVoice
    at packB.Voice.GetVoice(Native Method)
    at packB.Voice.GetVoiceList(VoiceLocal.java:1003)
    at packA.Display.<init>(DisplayApp.java:31)
    at packA.Display.main(DisplayApp.java:60)

    3. Then I changing my run.bat to the following & ran from Z and it WORKS!:
    Z:\folder1\app>java -Djava.library.path="C:/folder1/app" -classpath
    ...;.;../lib/packageB.jar;../app/packageA.jar packA.classA

    Why is it so that my application fails to run when I try to invoke it from
    Z? Is it because DLLs cannot be loaded from network drives? Why does it say
    Access is denied? Is there some permission that I need to set on Z drive?

    Thanks much,
    Rach
    Rachel, Jul 18, 2003
    #1
    1. Advertising

  2. Rachel

    Rach Guest

    >> 2. But when folder1 is located in a network drive, I get the
    following
    >> ERROR:
    >> Z:\folder1\app>java -Djava.library.path=. -classpath
    >> ..;.;../lib/packageB.jar;../app/packageA.jar packA.classA
    >> java.lang.UnsatisfiedLinkError: Z:\folder1\app\dllC.DLL: Access is

    denied:
    >> Check that native library dllC is in proper directory
    >> Exception in thread "main" java.lang.UnsatisfiedLinkError: GetVoice
    >> at packB.Voice.GetVoice(Native Method)
    >> at packB.Voice.GetVoiceList(VoiceLocal.java:1003)
    >> at packA.Display.<init>(DisplayApp.java:31)
    >> at packA.Display.main(DisplayApp.java:60)


    > As long as you have at least read access to the share, it should
    > work. For example, if you copy the JVM to a network drive, it
    > works just fine and has no trouble finding its own native
    > libraries and using them.


    Got it working now. Seems like the file permission for that DDL is set
    to r--. Changing the DDL's file permission to r-x solves this problem
    :)

    -Rach-
    Rach, Aug 6, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?SklNLkgu?=

    Q: DSN over a network drive

    =?Utf-8?B?SklNLkgu?=, Dec 15, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    1,861
    Scott Allen
    Dec 15, 2004
  2. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,804
    Smokey Grindel
    Dec 2, 2006
  3. shailesh
    Replies:
    1
    Views:
    776
    Tim Golden
    Mar 28, 2007
  4. Indo77
    Replies:
    0
    Views:
    488
    Indo77
    Jul 5, 2007
  5. king
    Replies:
    1
    Views:
    274
Loading...

Share This Page