🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Calling a dll func from Java

#686
From: Kevin Dean [TeamB]
Date: Fri, 25 Feb 2005 13:08
31 lines
1998 bytes
yc wrote:

> 
> Hi,
> I have a c dll (MyDll) stdcall fnc as follows.
> stdcall int MyFnc(int FileNo, int IOType, unsigned char *
> DataToWrite, unsigned char *  DataRead);
> 
> I try to call from java code, but it gives me an error as follows.
> 
> Exception in thread "main" java.lang.UnsatisfiedLinkError: Myfunc
>         at X.MyFnc(Native Method)
>         at X.main(X.java:6)
> 

That means that the Java process can't find the DLL in the system path.
Make sure that you add the appropriate directory to the PATH statement
or add -Djava.library.path=<dll_location> to the command line.

-- 
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/

NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html

Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
Technical Details
Message-ID: <xn0dyx2iu419bb001-kdean@www.teamb.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <421eedd1$2@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: f74b3,a69aa8c14ff32559
X-Google-Attributes: gidf74b3,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Kevin Dean [TeamB]" <NkOdSePaAnM@datadevelopment.com>
Subject: Re: Calling a dll func from Java
Newsgroups: borland.public.jbuilder.java.language
References:  <421eedd1$2@newsgroups.borland.com>
Organization: Dolphin Data Development Ltd.
User-Agent: XanaNews/1.17.2.7
X-Face: ":yn4zt^A_dn>6~{YJmu^B\'4w)e:apPM\VC=Dvf&*tASxX9|BYczkFd$xr.$vNSZ[3Uobr
 p]c4\+\l){!WQI.$]veP({HLd;CDYH?iN
Message-ID: <xn0dyx2iu419bb001-kdean@www.teamb.com>
X-Ref: newsgroups.borland.com ~XNS:000000E6
NNTP-Posting-Host: 24.57.153.235
Date: 25 Feb 2005 05:08:09 -0800
X-Trace: newsgroups.borland.com 1109336889 24.57.153.235 (25 Feb 2005 05:08:09 -0800)
Lines: 31
X-Authenticated-User: kdean
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail