The Artima Developer Community
Sponsored Link

Java Answers Forum
JNI problem

1 reply on 1 page. Most recent reply: Mar 17, 2002 11:51 PM by Matt Gerrans

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
yokvio

Posts: 2
Nickname: yokivo
Registered: Mar, 2002

JNI problem Posted: Mar 17, 2002 9:44 PM
Reply to this message Reply
Advertisement
what is this error message and how to get rid of it?

D:\abc\my documents\JAVA\jni>java Main
Exception in thread "main" java.lang.UnsatisfiedLinkError: no hello.dll in java.
library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at ali.HelloWorld.<clinit>(HelloWorld.java:6)
at Main.main(Main.java:5)


Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: JNI problem Posted: Mar 17, 2002 11:51 PM
Reply to this message Reply
I think this is just a matter of making sure that your JNI platform-dependent implementation file, hello.dll is either in the current directory or in the PATH. To see your path, type "path" on the command line. If the directory containing your hello.dll is not in that semi-colon separated list, then you need to add it to the path, or copy the dll to one of the directories that is already in the path. You can add a directory to your path like this:
set path=%path%;d:\New\Directory\To\Add\To\The\Path

Keep in mind that when you update the path in one console, it only affects that session, not others and will not be in force after you get the BSOD (which is probably immanent!) and have to reboot. So, if you want it to be permanent, add it to your system properties or autoexec.bat, depending upon your version of Windows.

Flat View: This topic has 1 reply on 1 page
Topic: Adding name values to a SRC URL string Previous Topic   Next Topic Topic: What is wrong with my start method?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use