🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: JNI

#16639
From: MarkL
Date: Fri, 05 Feb 1999 00:00
64 lines
3076 bytes
Its not an actual answer to your problem... but take a look at
http://www.nevaobject.com

Its supplies a function called Coroutine that enables you to directly access
Win Dll's without having to do the
JNI stuff. (Similar to JDirect).


John McNair wrote in message <36BB2F6E.67AB0B79@compsolve.com>...
>    I have a dll I wrote in C, and I would like to be able to access
>those functions from a Java program I am working on.  In my JBuilder2
>project, I have this class:
>
>package cca;
>
>public class comm_params {
>  public comm_params() {
>  }
>
>  public static native int SetPhoneNumber(String pPhoneNumber);
>
>  static
>  {
>    System.loadLibrary("cvc");
>  }
>}
>
>    I copied cvc.dll to c:\windows\system.  I have also tried
>c:\windows, and pwd, but I get the following output when I instantiate
>this class:
>Exception occurred during event dispatching:
>java.lang.UnsatisfiedLinkError: no cvc in shared library path
>        at java.lang.Runtime.loadLibrary(Compiled Code)
>        at java.lang.System.loadLibrary(Compiled Code)
>        at
>        at
>cca.cca_frame.cmdSendTransaction_mouseClicked(cca_frame.java:97)
>        at cca.cca_frame$2.mouseClicked(cca_frame.java:55)
>        at java.awt.Component.processMouseEvent(Compiled Code)
>        at borland.jbcl.view.BeanPanel.processMouseEvent(Compiled Code)
>        at java.awt.Component.processEvent(Compiled Code)
>        at java.awt.Container.processEvent(Compiled Code)
>        at borland.jbcl.view.BeanPanel.processEvent(Compiled Code)
>        at java.awt.Component.dispatchEventImpl(Compiled Code)
>        at java.awt.Container.dispatchEventImpl(Compiled Code)
>        at java.awt.Component.dispatchEvent(Compiled Code)
>        at java.awt.LightweightDispatcher.retargetMouseEvent(Compiled
>Code)
>        at java.awt.LightweightDispatcher.processMouseEvent(Compiled
>Code)
>        at java.awt.LightweightDispatcher.dispatchEvent(Compiled Code)
>        at java.awt.Container.dispatchEventImpl(Compiled Code)
>        at java.awt.Window.dispatchEventImpl(Compiled Code)
>        at java.awt.Component.dispatchEvent(Compiled Code)
>        at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
>
>    Can anyone help?  I could not find where to specify my shared
>library path in any of the JBuilder2 docs or faqs.
>--
>John McNair
>Computing Solutions
>jmcnair@compsolve.com
>
>
Technical Details
Message-ID: <79fbq2$115a$1@quince.news.easynet.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <36BB2F6E.67AB0B79@compsolve.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,893abc39c4b419e
X-Google-Attributes: gidf74b3,public
From: "MarkL" <leavym@easynet.co.uk>
Subject: Re: JNI
Date: 1999/02/05
Message-ID: <79fbq2$115a$1@quince.news.easynet.net>
X-Deja-AN: 441069162
References: <36BB2F6E.67AB0B79@compsolve.com>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
X-Complaints-To: abuse@easynet.net
X-Trace: quince.news.easynet.net 918237826 33962 212.212.99.225 (5 Feb 1999 18:03:46 GMT)
Organization: [posted via Easynet Ltd]
NNTP-Posting-Date: 5 Feb 1999 18:03:46 GMT
Newsgroups: borland.public.jbuilder.java.language