Wrong java.library.path in Netbeans?

I write some java code and call native method with JNI, it does not work under netbeas, but work well in terminal. I try use System.out.println(System.getProperty("java.library.path")); to know what's wrong, i get two different output:
netbeans: /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/jre/lib/i386/client:/usr/lib/jvm/java-1.5.0-sun-1.5.0.06/jre/lib/i386:
/usr/lib/jvm/java-1.5.0-sun-1.5.0.06/jre/../lib/i386terminal:
/usr/lib/jvm/java-1.5.0-sun-1.5.0.06/jre/lib/i386/client:/usr/lib/jvm/java-1.5.0-sun-1.5.0.06/jre/lib/i386:
/usr/lib/jvm/java-1.5.0-sun-1.5.0.06/jre/../lib/i386:/home/ray/Projects/swmse/ext:Yes, the "/home/ray/Projects/swmse/ext" is my defined LD_LIBRARY_PATH, but why cannot Netbeans find it?
Anybody know this? Thank you!
My environment JDK 1.5.0.06 + Netbeans 5.5 + Kubuntu 6.06

I've had a similar problem (or the same). At last my mistake was give "bad" names to my libraries.
Note the importance of the java line:
System.loadLibrary("nameiwant");
when compiling your .c program it will be:
..... -o libnameiwant.so .... ( i.e. "lib"+"nameiwant"+".so" )

Similar Messages

  • No orageneric9 in java.library.path on Win2000

    I have installed Instant Client on Win2000 by creating a directory, unzipping the archive to it, and adding it to my path. I get an UnsatisfiedLinkError when I try to connect to the database.
    "Exception in thread "main" java.lang.UnsatisfiedLinkError: no orageneric9 in java.library.path"
    Any idea what I've done wrong?
    TIA

    OK, sorry for the long delay. I was away from here a while then catching up on other things.
    I removed all the JDBC and Instant Client stuff and started again. The program outputs the path when it runs as such:
    java.library.path is
    C:\WINNT\system32;.;C:\WINNT\system32;C:\WINNT;C:\cygwin\usr\local\bin;C:\cygwin\bin;C:\cygwin\bin;C:\oracle;C:\WINNT\system32;C:\WINNT;C:\java1.4.2_04\bin;C:\j
    ava1.4.2_04\jre\bin;C:\WINNT\System32\Wbem;C:\arcgis\arcexe83\bin;C:\WINNT\system32\nls;C:\WINNT\system32\nls\ENGLISH;C:\apache-ant-1.6.1;C:\Subversion\bin;C:\j
    wsdp-1.3\jwsdp-shared\bin;C:\sp\bin;Z;.;.
    I have no idea why it is duplicating some entries at the start of the path.
    It also ouputs the jdbc url it constructs from some properties. That is
    jdbc:oracle:oci8:@ourhost:1521:pob
    I've used the thin driver before, so maybe there's an error in this url? The XDK docs explicitly exclude the thin driver for loading Schema based tables, and that is what I am trying to do.
    I guess there were Oracle 9 drivers lying around on disk somewhere, because the output today says
    Exception in thread "main" java.lang.UnsatisfiedLinkError: no orageneric10 in java.library.path
    I am trying to load a schema based XML table with an instance document. I have validated the document against the schema I used for the table. The jars (like xdb.jar) from the XDK are available at compilation time and execution time. I haven't found any orageneric?.* file anywhere in the the XDK or Instant Client downloads.
    Am I attempting something that requires a full client install? Am I specifying the URL incorrectly? Am I prgramming under a curse since I snuck my own Gummi Worms into the theater to see Shrek 2?
    Thanks

  • How to set java.library.path form code

    I'm new to JNI. I see there are several ways to set JVM to look for libraries dll, so, etc.
         System.setProperty("java.library.path", ".");
         System.loadLibrary("hello");That's when UnsatisfiedLinkError
    java.lang.UnsatisfiedLinkError: no hello in java.library.path
         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
         at java.lang.Runtime.loadLibrary0(Runtime.java:822)
         at java.lang.System.loadLibrary(System.java:992)
         at HelloWorld.main(HelloWorld.java:17)But if I comment the line that sets the java.library.path and call the program with the command java -Djava.library.path=. HelloWorld works.
    The question is: Why is not working? How should it be the property setup? I rather don't set Variables, or use -D option.
    Thanks in advance.
    PD: If it helps I'm using JDK 1.5.0_01 on Linux kernel 2.6.8

    well i wrote the script and everything is fine! i can run the blackbox example on the commapi.
    But i am writing another program using netbeans to send some data to a PIC microcontroller using the serial port (that is why i installed the commapi), and when i'm trying to build it or run it on netbeans throws this error:
    Error loading LinuxSerialParallel: java.lang.UnsatisfiedLinkError: no LinuxSerialParallel in java.library.path
    Exception in thread "main" java.lang.UnsatisfiedLinkError: isDevLink
    at com.sun.comm.Unix.isDevLink(Native Method)
    at com.sun.comm.PathBundle.add(PathBundle.java:108)
    at com.sun.comm.PlatformPortBundle.<init>(PlatformPortBundle.java:44)
    at javax.comm.CommPortIdentifier.<clinit>(CommPortIdentifier.java:138)
    as far as i know it seems to be missing a library (LinuxSerialParallel), if this is right, adding the library would solve the error?how can i add the library? is there another way to solve this?
    thanks in advance!!

  • No jacob in java.library.path.doc

    I am running Developer Suite 10g on Windows XP. I have the OC4J instance running. I am using WebUtil and trying to use the OLE2 stuff. When I execute the code, nothing happens (see errors below) – except all my buttons go dead. I checked, and it does not seem that I am getting the Jacob, JNIsharedstubs, and the d2kwut60 DLLs to download to my Jinitiator directory. I removed and reinstalled Jinitiator, but still nothing. If I manually copy the DLLs to the directory, I at least begin to get OLE2 errors. I read the message board (and modified “Word.Basic” to “Word.Application”) and read the WebUtil manual and reviewed my set-up. Any suggestions are much appreciated.
    Java console:
    Oracle JInitiator: Version 1.3.1.17
    Using JRE version 1.3.1.17-internal Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\don4
    Proxy Configuration: Automatic Proxy Configuration
    JAR cache enabled
    Location: C:\Documents and Settings\don4\Oracle Jar Cache
    Maximum size: 50 MB
    Compression level: 0
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    q: hide console
    s: dump system properties
    t: dump thread list
    x: clear classloader cache
    0-5: set trace level to <n>
    Downloading http://d26.corp.don.com:8889/forms90/java/f90all_jinit.jar to JAR cache
    Downloading http://d26.corp.don.com:8889/forms90/webutil/webutil.jar to JAR cache
    RegisterWebUtil - Loading Webutil Version 1.0.2 Beta
    Downloading http://d26.corp.don.com:8889/forms90/webutil/jacob.jar to JAR cache
    proxyHost=null
    proxyPort=0
    connectMode=HTTP, native.
    Forms Applet version is : 9.0.4.0
    2004-Jun-18 14:33:28.903 WUI[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
    2004-Jun-18 14:33:28.953 WUF[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
    2004-Jun-18 14:33:28.983 WUH[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
    2004-Jun-18 14:33:29.13 WUS[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
    2004-Jun-18 14:33:29.53 WUT[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
    2004-Jun-18 14:33:29.214 WUO[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
    2004-Jun-18 14:33:29.254 WUL[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
    2004-Jun-18 14:33:29.284 WUB[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
    2004-Jun-18 14:33:34.745 WUT[setProperty()] Setting property WUC_GET_LOCAL_PROPERTY to syslib.jacob.dll
    2004-Jun-18 14:33:34.785 WUT[getProperty()] Getting property WUC_GET_LOCAL_PROPERTY
    2004-Jun-18 14:33:34.815 WUT[loadSettings()] Local properties file loaded
    2004-Jun-18 14:33:34.855 WUT[setProperty()] Setting property WUC_GET_LOCAL_PROPERTY to syslib.JNIsharedstubs.dll
    2004-Jun-18 14:33:34.895 WUT[getProperty()] Getting property WUC_GET_LOCAL_PROPERTY
    2004-Jun-18 14:33:34.926 WUT[setProperty()] Setting property WUC_GET_LOCAL_PROPERTY to syslib.d2kwut60.dll
    2004-Jun-18 14:33:34.976 WUT[getProperty()] Getting property WUC_GET_LOCAL_PROPERTY
    2004-Jun-18 14:33:49.722 WUF[setProperty()] Setting property WUF_FILENAME to C:\temp
    2004-Jun-18 14:33:49.722 WUF[setProperty()] Setting property WUF_FILE_ATTRIBUTE to 1
    2004-Jun-18 14:33:49.722 WUF[getProperty()] Getting property WUF_FILE_ATTRIBUTE
    2004-Jun-18 14:33:49.742 WUF[setProperty()] Setting property WUF_FILENAME to C:\temp
    2004-Jun-18 14:33:49.742 WUF[setProperty()] Setting property WUF_FILE_ATTRIBUTE to 4
    2004-Jun-18 14:33:49.742 WUF[getProperty()] Getting property WUF_FILE_ATTRIBUTE
    2004-Jun-18 14:33:49.752 WUF[setProperty()] Setting property WUF_GFN_DIRNAME to C:\temp
    2004-Jun-18 14:33:49.772 WUF[setProperty()] Setting property WUF_FILENAME to *.csv
    2004-Jun-18 14:33:49.772 WUF[setProperty()] Setting property WUF_FILTER to All CSV Files (*.csv)|*.csv|
    2004-Jun-18 14:33:49.792 WUF[setProperty()] Setting property WUF_GFN_MESSAGE to Open Interface Import File
    2004-Jun-18 14:33:49.822 WUF[setProperty()] Setting property WUF_GFN_MULTISELECT to FALSE
    2004-Jun-18 14:33:49.822 WUF[getProperty()] Getting property WUF_GFN_OPENFILE
    2004-Jun-18 14:33:52.904 WUF[setProperty()] Setting property WUF_FILENAME to false
    2004-Jun-18 14:33:52.904 WUF[setProperty()] Setting property WUF_FILE_ATTRIBUTE to 4
    2004-Jun-18 14:33:52.904 WUF[getProperty()] Getting property WUF_FILE_ATTRIBUTE
    2004-Jun-18 14:33:52.914 WUF[setProperty()] Setting property WUF_FILENAME to false
    2004-Jun-18 14:33:52.914 WUF[setProperty()] Setting property WUF_FILE_ATTRIBUTE to 1
    2004-Jun-18 14:33:52.914 WUF[getProperty()] Getting property WUF_FILE_ATTRIBUTE
    2004-Jun-18 14:33:52.924 WUF[setProperty()] Setting property WUF_FILENAME to false
    2004-Jun-18 14:33:52.924 WUF[setProperty()] Setting property WUF_FILE_ATTRIBUTE to 2
    2004-Jun-18 14:33:52.934 WUF[getProperty()] Getting property WUF_FILE_ATTRIBUTE
    2004-Jun-18 14:34:00.212 WUO[setProperty()] Setting property WUO_OLE2_OBJNAME to WORD.Basic
    2004-Jun-18 14:34:00.222 WUO[getProperty()] Getting property WUO_OLE2_CREATE_OBJ
    Exception occurred during event dispatching:
    java.lang.UnsatisfiedLinkError: no jacob 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 com.jacob.com.Dispatch.<clinit>(Dispatch.java)
    at oracle.forms.webutil.ole.OleFunctions.create_obj(OleFunctions.java:513)
    at oracle.forms.webutil.ole.OleFunctions.getProperty(OleFunctions.java:218)
    at oracle.forms.handler.UICommon.onGet(Unknown Source)
    at oracle.forms.engine.Runform.onGetHandler(Unknown Source)
    at oracle.forms.engine.Runform.processMessage(Unknown Source)
    at oracle.forms.engine.Runform.processSet(Unknown Source)
    at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
    at oracle.forms.engine.Runform.onMessage(Unknown Source)
    at oracle.forms.engine.Runform.processEventEnd(Unknown Source)
    at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
    at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    J:\WebUtil\server\WebUtil.cfg file contains:
    install.syslib.location=http://d26.corp.don.com:8889/forms90/webutil
    install.syslib.0.7.1=jacob.dll|94208|1.0|true
    install.syslib.0.9.1=JNIsharedstubs.dll|65582|1.0|true
    install.syslib.0.9.2=d2kwut60.dll|192512|1.0|true
    C:\Oracle\10iDS2\forms90\server\default.env contains:
    ORACLE_HOME=c:\oracle\10iDS2
    FORMS90_PATH=c:\oracle\10iDS2\cgenf61\admin;c:\oracle\10iDS2\forms90;c:\ipms\forms10g;j:\WebUtil\forms;j:\WebUtil\lib;j:\bin10g
    PATH=c:\oracle\10iDS2\bin;c:\oracle\10iDS2\jdk\jre\bin\client
    FORMS90=c:\oracle\10iDS2\forms90
    WEBUTIL_CONFIG=j:\webutil\server\webutil.cfg
    CLASSPATH=j:\webutil\lib\webutil.jar;j:\webutil\lib\jacob.jar;c:\oracle\10iDS2\jdk\jre\lib\rt.jar;c:\oracle\10iDS2\j2ee\forms90app\forms90web\WEB-INF\lib\f90srv.jar;c:\oracle\10iDS2\jlib\repository.jar;c:\oracle\10iDS2\jlib\ldapjclnt9.jar;c:\oracle\10iDS2\jlib\debugger.jar;c:\oracle\10iDS2\jlib\ewt3.jar;c:\oracle\10iDS2\jlib\share.jar;c:\oracle\10iDS2\jlib\utj90.jar;c:\oracle\10iDS2\jlib\zrclient.jar;c:\oracle\10iDS2\reports\jlib\rwrun.jar;C:\Oracle\10iDS2\jdk\jre\bin\client\jvm.dll
    Orion-web.xml contains:
    <virtual-directory virtual-path="/webutil" real-path="j:\webutil\lib" />
    Forms90.conf contains:
    # Virtual path for webutil
    AliasMatch ^/forms90/webutil/(..*) "j:\webutil\lib/$1"
    Formsweb.cfg has all changes in one named section:
    [webutil]
    pageTitle=Oracle9iAS Forms Services - WebUtil
    webUtilArchive=/forms90/webutil/webutil.jar,/forms90/webutil/jacob.jar
    WebUtilLogging=all
    WebUtilLoggingDetail=detail
    WebUtilErrorMode=Alert
    baseHTMLjinitiator=j:\webutil\server\webutiljini.htm

    >
    Orion-web.xml contains:
    <virtual-directory virtual-path="/webutil"
    real-path="j:\webutil\lib" />
    Forms90.conf contains:
    # Virtual path for webutil
    AliasMatch ^/forms90/webutil/(..*)
    "j:\webutil\lib/$1"
    I'm not sure about 10G, but for 9ids this is definitely wrong (see famous page 6 of 49 WebUtil Manual). On 9ids you have to add the virtual directory in orion-web.xml only, not in forms90.conf. On 9ias it is vice verca.
    Hope this helps
    Gerald

  • No ocijdbc8 in java.library.path (with Netscape under Tomcat)

    Hello,
    my problem is the following: I must use the OCI-Driver of the Oracle-Client 8.1.7 because I use special PL/SQL-functions.
    I get the error message:
    java.lang.UnsatisfiedLinkError: no ocijdbc8 in java.library.path
    when I try to start my servlet within netscape. Before this I'm starting the tomcat servlet engine and make the following path known to tomcat:
    java.library.path=/usr/lib:/lib:/share/ams/oracle/ora817-SunOS-5.7/lib:/share/ams/oracle/ora817-SunOS-5.7/jdbc/lib:/share/ams/oracle/ora817-SunOS-5.7/lib64
    In this line are the necessary paths to find the libocijdbc8.so library.
    Why does the servlet still have problems to find the driver? In addition, I set my java.library.path within the servlet itself.
    Do you know where is the crux of the matter?
    Thank you,
    Christian Schmidbauer

    Hello:
    libocijdbc9.so exists in the LD_LIBRARY_PATH. Tried
    linking/copying classes12.zip from $TOMCAT_HOME/common/lib to $TOMCAT_HOME/webapps/APP_NAME/WEB-INF/lib causes the error:
    java.lang.UnsatisfiedLinkError: /usr/apps/oracle/product/9.2.0/lib/libocijdbc9.so: ld.so.1: /usr/j2se/bin/java: fatal: /usr/apps/oracle/product/9.2.0/lib/libocijdbc9.so: wrong ELF class: ELFCLASS64
    when the CATALINA_OPTS has -d32 and
    -Djava.library.path=$ORACLE_HOME/lib(tried giving them as JAVA_OPTS in catalina.sh as well)
    Thanks!

  • No muxer in java.library.path error

    I get this when I try to run server6.0 on win98. can someone help me understand what is wrong?
    Thanks!
    <Nov 17, 2001 4:17:16 PM CST> <Error> <Performance Pack> <Unable to load perform
    ance pack, using Java I/O.
    java.lang.UnsatisfiedLinkError: no muxer in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1312)
    at java.lang.Runtime.loadLibrary0(Runtime.java:749)
    at java.lang.System.loadLibrary(System.java:820)
    at weblogic.socket.PosixSocketMuxer.<init>(PosixSocketMuxer.java:90)
    at java.lang.Class.newInstance0(Native Method)

    Ramesh & Kumar,
    I got the same error when I tried to run WL Server 6.1
    on my Windows 98. Here is the complete trace. Is this
    error something that can be ignored because it sounds
    like it is something just for performance.
    <Nov 21, 2001 1:57:21 PM EST> <Error> <Performance Pack> <Unable to load perform
    ance pack, using Java I/O.
    java.lang.UnsatisfiedLinkError: no muxer in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1312)
    at java.lang.Runtime.loadLibrary0(Runtime.java:749)
    at java.lang.System.loadLibrary(System.java:820)
    at weblogic.socket.PosixSocketMuxer.<init>(PosixSocketMuxer.java:90)
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:237)
    at weblogic.socket.SocketMuxer.makeTheMuxer(SocketMuxer.java:128)
    at weblogic.socket.SocketMuxer.getMuxer(SocketMuxer.java:83)
    at weblogic.t3.srvr.ListenThread.run(ListenThread.java:232)
    >
    <Nov 21, 2001 1:57:22 PM EST> <Notice> <WebLogicServer> <Started WebLogic Admin
    Server "petstoreServer" for domain "petstore" running in Production Mode>
    Looks like the petstore application is working...inspite of the
    above error message.
    Thanks,
    Balaji.
    Kumar Allamraju <[email protected]> wrote:
    It appears the following stack trace is incomplete.
    I can't believe the stack trace is originated from PosixSocketMuxer.
    posix is only for unix platform.
    In anycase before loading a performance pack we check the OS and
    based on that we will load the appropriate dll/shared library.
    AFAIK, performance pack is not certified on 98.
    That's why it's failing.
    Kumar
    Ramesh wrote:
    I get this when I try to run server6.0 on win98. can someone helpme understand what is wrong?
    Thanks!
    <Nov 17, 2001 4:17:16 PM CST> <Error> <Performance Pack> <Unable toload perform
    ance pack, using Java I/O.
    java.lang.UnsatisfiedLinkError: no muxer in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1312)
    at java.lang.Runtime.loadLibrary0(Runtime.java:749)
    at java.lang.System.loadLibrary(System.java:820)
    at weblogic.socket.PosixSocketMuxer.<init>(PosixSocketMuxer.java:90)
    at java.lang.Class.newInstance0(Native Method)

  • Error: no jmvfw in java.library.path

    Hello
    Exception in thread "VFW Request Thread" java.lang.UnsatisfiedLinkError: JMFSecurityManager: java.lang.UnsatisfiedLinkError: no jmvfw in java.library.path
         at com.sun.media.JMFSecurityManager.loadLibrary(JMFSecurityManager.java:206)
         at com.sun.media.protocol.vfw.VFWCapture.<clinit>(VFWCapture.java:19)
         at com.sun.media.protocol.vfw.VFWSourceStream.doConnect(VFWSourceStream.java:241)
         at com.sun.media.protocol.vfw.VFWSourceStream.run(VFWSourceStream.java:763)
         at java.lang.Thread.run(Thread.java:595)I get this error when use jdk1.5.0 but I don't have it when use older JDK...
    Anyone could know why it happens and how to make it working with JDK1.5.0??
    Thx
    Bartek

    SunForumsGuest wrote:
    FYI -- For some reason, on my Win7 x64 machine, if I installed JMF and the option "move dlls to windows/system" directory was checked, those DLLs were never installed on my system.
    If you UNCHECK that during install they will show up in the JMF/lib directory.
    C:\Program Files (x86)\JMF2.1.1e\lib
    Hope it helps. I've been going nuts until I just figured that out.Hello,
    thanks for the tip - I followed your instructions and have the dlls. However, when I try running some code, this error occurs:
    jmvfw.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
    I cannot find dll's compiled for 64-bit on the Internet; has anybody else faced this problem?
    I use Netbeans under Win7.

  • UnsatisfiedLinkError and java.library.path?

    I did look for this topic in this forum. The question has been asked, but I don't see an answer :(
    I get an error at runtime...
    "java.lang.UnsatisfiedLinkError: no EZTaxJavaCpp.dll in java.library.path
    at java.lang.ClassLoader.loadLibrary(Unknown Source)"
    Code...
    public class EZTaxJNI {
    private native void sendEZCmd(String cmd);
    static{
    System.loadLibrary("EZTaxJavaCpp.dll");
    public static void main(String[] args) {
    EZTaxJNI ez = new EZTaxJNI();
    ez.sendEZCmd("control initialize");
    System.out.println("JNI");
    The dll exists. I tried adding the path with the dll name and it didn't work. I tried removing the .dll extention and no luck. Where do I set java.library.path?

    regarding the dll not found :
    - if you state System.loadLibrary(...) you need to put the dll into a system library (like system32)
    - if you state System.load(....) you can/must specify the complete path to your dll
    regarding the UnsatisfiedLinkError :
    three reasons I can think of :
    - if your java module belongs to a package, i.e. if you have a statement like
    package com.hllapi;
    in your code, then you need to state this in the native code like this
    JNIEXPORT jstring JNICALL Java_com_hllapi_JRmmApi_runCommand (JNIEnv *env, jobject obj, jstring cmd)  
    - something in the header file is wrong ?
    I usually have the 'extern "C" .....' statement in the header file,
    but I guess your way should work as well
    - finally, I just realized, that you have two underscores in your statement after 'Java'
    -> Java__EZTaxJNI_sendEZCmd(JNIEnv* env, jobject, jstring jMsg
    this might be a problem
    Hope this helps....

  • Error with System.loadLibrary(...) with java.library.path set

    I'm trying to get my feet wet with JavaMonkeyEngine using netbeans (on Windows XP SP3, Java 1.6).
    When I try to run a simple example program, I'm getting
    Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl.dll in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1709)
    My runtime arguments include: -Djava.library.path="../../../../../projectSupport/jME2/lib/lib/lwjgl/native/windows/:etc
    I'm pretty sure that the path is correct, because I tried the following code:
    String [] dirs = System.getProperties().getProperty("java.library.path").split(":");
    for(int i = 0; i < dirs.length; i++ ){
    String path = dirs[i] + java.io.File.separatorChar + "lwjgl.dll";
    if( (new java.io.File(path)).exists()) {
    System.out.println("found in dir " + dirs);
    path = (new java.io.File(path)).getAbsolutePath();
    System.load(path);
    System.out.println("was able to load library manually");
    and the System.load method was reached and didn't throw an exception.
    However, the below call does throw an exception.
    System.loadLibrary("lwjgl.dll");
    Presumably, I shouldn't need to put the dlls into my Path (otherwise whats the purpose of the -D argument).
    I would appreciate some brilliant illuminating thought about now, something like "you forgot the magical snafu parameter" or such.
    Thanks in advance.
    Eric.

    My runtime arguments include:
    -Djava.library.path="../../../../../projectSupport/jME2/lib/lib/lwjgl/native/windows/:{code}So, you're on a Windows OS, and looking for a Windows DLL?
    I'm pretty sure that the path is correct, because I tried the following code:
    {code}String [] dirs = System.getProperties().getProperty("java.library.path").split(":");{code}So, you're specifying a path using the UNIX separator ':', instead of the Windows one ';'?
    Your test code has the knowledge to parse a LINUX-like path, but the Windows VM doesn't have this knowledge (I admit the misleading part is that the VM generally accepts '/' as a file separator (instead of the Windows-standard '\' one), but doesn't recognize the ':' separator). Try using ';' to separate multiple pathes in your command line:
    {code}-Djava.library.path="../../../../../projectSupport/jME2/lib/lib/lwjgl/native/windows/;<noticeTheSeparators>;...    J.
    Edited by: jduprez on Jan 12, 2010 1:39 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Help: java.library.path and javah

    Hello,
    I have a little problem with my java.library.path!
    I am working on a program which loads a dll in c++ that I have compiled
    and will be used by a java program.
    My java program consists of 2 Classes:
    -- MonitorContainer.class creates an object; this object has an attribute which is a String type and it should be communicating with my dll: Diskid32.dll
    -- This dll is loaded by another class : Diskid32.class with a known
    and documented method: System.loadLibrary("Diskid32").
    When all the following files(MonitorContainer.class, Diskid32.class, Diskid32.dll) are in the same folder, the program works fine
    I need to put the Diskid32.dll and the Diskid32.class into a package! (package myutil.Disk)
    I have two questions concerning the javah tool:
    -- when I when I create the signatures with javah should I run:
    ------ javah Diskid32 or something else like
    ------ javah util.Disk.Diskid32 or ...
    I have tried both of these and they produce header files which are different and both produce the same result in execution error
    when I run my program and it's package
    -- I tried to configure the java.library.path but still no go! When I launch java MonitorContainer I receive the following wrong message :
    Exception in thread "main" java.lang.UnsatisfiedLinkError: no Diskid32 in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1344)
    at java.lang.Runtime.loadLibrary0(Runtime.java:744)
    at java.lang.System.loadLibrary(System.java:815)
    at myutil.Disk.Diskid32.<clinit>(Diskid32.java:52)
    at MonitorContainer.main(MonitorContainer.java:21)
    My conclusion is that library path is not well configured
    and the JVM is not finding my library diskid32.dll.
    Thank for all...
    Stephane

    Hello,
    I 've solve my problem: to set the library path You must write :
    java -Djava.library.path=c:/xxx/yyy/zzz ; c:/xxx/yyy/zzz is the path to locate the Dll!
    But the really problem was a forgetting in the c++ code, I have write a mistake in the line that references � class!
    (jclass cls = env->FindClass(".../.../...");)
    Thank for all

  • Migration 10.1.2 - 10.1.3, error:: no ocijdbc10 in java.library.path

    Hi,
    I'm using Jdev 10.1.3, and my problem is the following one:
    In my connection definition, that ORACLE_JDBC_TYPE is oci8 and when i try to conenct to BD, it occurs:
    java.lang.UnsatisfiedLinkError: no ocijdbc10 in java.library.path
    I've Oracle Client 9i and 8i, i've used each of them, but it doesn'nt work
    I've drivers,jar, dll of client 10, becuase i supposse that it is that application need,
    and i copy them in jdbc/lib of Oracle client(8i and 9i) and in jDev 10.1.3, but it doesn`t work.
    The files are :
    jars:: classes12.jar and ojdbc14.jar
    dll ::oci.dll,ocijdbc10.dll, ociw32.dll,orannzsbb10.dll,oraocci10.dll and oraociei10.dll
    Is there other path else where i should copy this jars,dllls?
    Could we help me?
    Thanks.

    I am not familiar with Mac OS, but there are two things I can think of that you can check:
    - This is trivial, and you probably did that: ist libocijdbc10.dylib in /usr/local/oracle/instantclient10_1 ?
    - Could it be that Java is 32-bit and libocijdbc10.dylib is 64-bit or vice versa?
    Yours,
    Laurenz Albe

  • How can i find what the java.library.path is?? urgent

    Hi,
    I have an unsatisfiedlinkerror and the message is no jicmp in java.library.path. can anyone tell me how to do System.out.println and the path???
    This is very urgent so anyhelp would be gratefully recieved
    Thanks
    Vanessa

    I have an unsatisfiedlinkerror and the message is no
    jicmp in java.library.path.
    can anyone tell me how to
    do System.out.println and the path???System.getProperty() will retrieve the Java-defined system properties. You can use the following code to determine the available values:
    public static void main( String [] args ) {
    java.util.Properties p = System.getProperties();
    java.util.Enumeration keys = p.keys();
    while( keys.hasMoreElements() ) {
    System.out.println( keys.nextElement() );
    Refer http://www.javaworld.com/javaworld/javaqa/2001-07/01-qa-0706-env.html
    Jatin

  • Starting JVM from C++ via JNI with specified java.library.path switch...

    Please how i can pass java.library.path switch to JVM during JVM creating in C++...????

    Check out this tutorial: http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html
    Do a search for the word 'Djava.library.path'
    fitz

  • How to pass java.library.path as a VM argument in JNLP file

    I jave a jar file containing reference to sqljdbc4.jar as I am using JDBC to talk with SQL Server. It works fine through eclipse IDE when I give the fillowing VM Argument
    -Djava.library.path=C:\Users\reddys2\Downloads\sqljdbc_4.0\enu\auth\x86. Without this I get the "error message" saying that "failed to load sqljdbc_auth.dll
    Now I would like to bundle working jar file in .jnlp and invoke through browser. I tried to add vm argunment (<property name="java.library.path" value="C:\Users\reddys2\Downloads\sqljdbc_4.0\enu\auth\x86"/> ) in the .jnlp file. But still i am getting "WARNING:Failed to load the sqljdbc_auth.dll cause:no sqljdbc_auth in java.library.path"
    Any help is greatly appreciated. Here are the contents of JNLP file
    =======================================================================================
    ?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="1.0+" codebase="http://xxx.16.19.56:8080/ifsdTools/" href="PF_UserList.jnlp">
    <information>
    <title>Login into PF</title>
    <vendor>XXX XXXX</vendor>
    <description>Provides ability to mirror PF Data base locally</description>
    </information>
    <resources>
         <j2se version="1.4+"/>
         <jar href="PopulateIFSDProjectForgeData.jar" />
         <jar href="Psqljdbc4.jar" main/>
         <property name="java.library.path" value="."/>
         <property name="javax.net.ssl.keyStore" value="NONE"/>
         <property name="javax.net.ssl.keyStoreType" value="PKCS11"/>
         <property name="http.proxyHost" value="proxy1.lmco.com"/>
         <property name="http.proxyPort" value="80"/>
         <property name="java.library.path" value="C:\Users\xxxx\Downloads\sqljdbc_4.0\enu\auth\x86"/>
         <property name="pfProjectId" value="proj1073" />
    </resources>
    <security>
         <all-permissions/>
    </security>
    <application-desc main-class="ifsdTools.PopulateIFSDProjectForgeData" />
    </jnlp>
    =========================================================================================================
    Edited by: 878645 on Apr 26, 2012 3:43 PM

    Thanks for the pointer. Question that I have is I am referencing sqljdbc4.jar in my application, which in turn using sqljdbc_auth.dll.
    Which one should i refernce through <nativelib>. Is it sqljdbc4.jar or sqljdbc_auth.dll.
    have added the following line to the .jnlp.
    <nativelib href="sqljdbc4.jar"/>
    But still it is complaining on sqljdbc_audth.dll. If it is sqljdbc_auth.dll, can I use <nativelib> to pass it.
    In that case does it need to be signed?. If so,
    Is it possible to sign .dll using 'jarsigner'?.
    Edited by: 878645 on Apr 26, 2012 3:43 PM

  • How do i print out the java.library.path??

    hi, can anyone show me how to print out java.library.path to the terminal? im having unsatisfiedlinkerror problems
    thanks for help in advance
    vanessa

    System.out.println(System.getProperty("java.library.path"));

Maybe you are looking for