🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #17213

Re: HELP!! Can't load .dll

#17213
From: Peter Peld�n
Date: Thu, 03 Dec 1998 00:00
61 lines
2824 bytes
[This followup was posted to borland.public.jbuilder.java.language and a 
copy was sent to the cited author.]

In the very interesting article <3662EDE9.F93BA776@iscg.com>, 
mulletg@iscg.com made this clever claim...
> Hi:
> 
> 
> I've been trying to get a dynamic library to load correctly in an
> application created with JB CS 1.0.1
> 
> I've used the library in a previous app with the System.load() function
> and the function I call in that library works fine. BUT now when I use
> the same exact code minus the package name changes it doesn't work
> anymore.
> 
> In other words, all i did was copy the code from the old app to the new
> one PLUS the .dll files I need to the new app. When I try to use the
> ENCODE function in my library i get the following message:
> 
> Exception occurred during event dispatching:
> java.lang.UnsatisfiedLinkError: encodeMMF
>  at untitled1.MMFStringEncoder.encode(MMFStringEncoder.java:15)
>  at untitled1.SingleStringEncoder.encode(SingleStringEncoder.java:20)
>  at untitled1.Frame1.button1_actionPerformed(Frame1.java:89)
>  at
> untitled1.Frame1_button1_actionAdapter.actionPerformed(Frame1.java:127)
>  at java.awt.Button.processActionEvent(Button.java:172)
>  at java.awt.Button.processEvent(Button.java:153)
>  at java.awt.Component.dispatchEventImpl(Compiled Code)
>  at java.awt.Component.dispatchEvent(Compiled Code)
>  at java.awt.EventDispatchThread.run(EventDispatchThread.java:63)
> 
> What could possibly have changed? I didn't touch the .dll file or the
> code that calls it.
> 
> Thanks,
> Tim
> 
> begin:vcard 
> n:Mulle';Timothy
> x-mozilla-html:FALSE
> url:www.iscg.com
> org:Integrated Systems Consulting Group
> adr:;;575 E. Swedesford Rd.;Wayne;PA;19087;USA
> version:2.1
> email;internet:mulletg@iscg.com
> title:Senior Java Developer
> fn:Timothy G. Mulle'
> end:vcard
> 
You probably changed the working directory. loadLibrary tries to locate 
the dll in the PATH on a windows machine and that includes . (working 
dir). If you start the java VM machine from a different directory than 
from the one containing the dll, the VM won't find it unless the PATH 
variable also points out that directory.
Try adding the dll to C:\Windows or c:\Windows\System on win95 or 
C:\winnt\system32 on WinNT, or start the java program from the directory 
containing the dll.

Peter
Technical Details
Message-ID: <MPG.10d0be6366e7e722989684@forums.inprise.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3662EDE9.F93BA776@iscg.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,e37e5983b6656aec
X-Google-Attributes: gidf74b3,public
From: Peter.Peldan@ellemtel.se (Peter Peld�n)
Subject: Re: HELP!! Can't load .dll
Date: 1998/12/03
Message-ID: <MPG.10d0be6366e7e722989684@forums.inprise.com>
X-Deja-AN: 418242171
References: <3662EDE9.F93BA776@iscg.com>
Organization: Ellemtel
Newsgroups: borland.public.jbuilder.java.language