🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

JNI

#16638
From: John McNair
Date: Fri, 05 Feb 1999 00:00
53 lines
2547 bytes
    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: <36BB2F6E.67AB0B79@compsolve.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,893abc39c4b419e,start
X-Google-Attributes: gidf74b3,public
From: John McNair <jmcnair@compsolve.com>
Subject: JNI
Date: 1999/02/05
Message-ID: <36BB2F6E.67AB0B79@compsolve.com>
X-Deja-AN: 441065855
Content-Transfer-Encoding: 7bit
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: Computing Solutions
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language