Native library & JAR

Is it possible to add native library into JAR?
Archive: JarTest.jar
META-INF/
META-INF/MANIFEST.MF
test/
test/Hello.class
test/Native.class
libtestnative.so
MANIFEST.MF
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: 1.5.0_06-b05 (Sun Microsystems Inc.)
Main-Class: test.Native
Bundle-NativeCode: /libtestnative.so;  osname=Linux,       processor=i386This command works perfectly:
java -Djava.library.path=./lib_native -cp bin test.Native
but if I use JAR:
$ java -cp JarTest.jar test.Native
Exception in thread "main" java.lang.UnsatisfiedLinkError: no testnative 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 test.Native.<clinit>(Native.java:13)
I have also tryied:
java -Djava.library.path=./jar/JarTest.jar -cp ./jar/JarTest.jar test.Native
java -Djava.library.path=./ -cp ./jar/JarTest.jar test.Native
With the same result.
Any help would be realy appreciated.

One way would be to create a helper class that:
1- Verifies that the native library is already located in a specific folder (could be the one specified by the user.home system property).
If so then go to step -3-.
2- Extracts the native library from the jar (with the Class.getResourceAsStream() method for instance) to the specific folder.
3- Loads the native library with the System.load() method which requires a complete path name.
Regards

Similar Messages

  • NOT WORKING: Putting a jar file requiring native library in bootclasspath

    Hi,
    I put my own jar file into the bootclasspath like this:
    java -Xbootclasspath/p:myboot.jar TestClass
    Some classes in the jar require a native library. For JVM 1.3 on Solaris, I put the native library in $JAVA_HOME/jre/lib/sparc and everything works just fine.
    However, when I try the same thing on JVM1.4, I got the following error when my class containing the native methods is called:
    Failed to load the native library: myboot_native
    java.lang.UnsatisfiedLinkError: no myboot_native in java.library.path
    I tried to put that native library in several different directories in jre/lib but still had no luck.
    Is there anybody know the solution? Does JVM1.4 allow me to put a custom jar file that requires a native library in the bootclasspath?
    Regards,
    Eman

    Well is your file in a directory included in the java.library.path environement variable. I use java on windows but I have to add the directory where my native library is to the path variable (not classpath) in order to avoid the error you get.

  • Bundling a native library in a jar file

    Is it possible to bundle a native library ( a windows dll ) in a jar file. How to let the vm know that the native dll is in a jar file.
    Is this possible?
    thanks
    --kiran                                                                                                                                                                                                                                                                                                                                                   

    hello all
    i cann't find out (or don't understand) the way what i need. i mean how can i copy the dll file(s) in the windows system diractory? i can put the dll in the jar file then how can i copy that dll after extract?
    "daney" said that he have done it.
    This certianly is possible. I have done it.
    You have to extract the dll from the jar file and write it to a temporary >file in the file system. Then call System.load() on the file you just >extracted.
    Do you want to delete the temporary file when you are done with it? >That is a bit more difficult, but it is possible if you use a ClassLoader >to run your code containing native methods.anybody have any idea how he has done? please give some details if anyone have worked on it before.i am waiting for the solutions.
    thanks
    bashar

  • How to use a native library packaged in a connector

    Hi,
    I know how to package a native library into a connector in my app server. But I don't quite know how to use it. Suppose I provide a wrapper java class for the native library, can I use the java class directly in my EJB (since the classloader of the RA is the parent of the EJB classloader) or I have to issue an outbound call?
    Thanks,
    Haitao

    Thanks Vidyut! You've answered my question.
    I placed the jar file in the $CATALINA_HOME/shared/lib directory. But where should I place the taglib TLD file? And how should I reference it in web.xml?
    Currently, my web.xml is as follows and it doesn't work.
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <taglib>
    <taglib-uri>http://abc.com</taglib-uri>
    <taglib-location>c:\Tomcat\shared\lib\mytags-taglib.tld</taglib-location>
    </taglib>
    </web-app>
    Thanks again!
    Joe

  • Problem :  Native Library already loaded in another classloader

    I created a shared library HaspKeyAPI.dll by using JNI and add path to Java class library. I need to call native functions in my servletAction class to check some information in a key. Sometimes not always, I met �java.lang.UnsatisfiedLinkError: Native Library C:\eclipse\workspace\HaspKey\SharedLib\HaspKeyAPI.dll already loaded in another classloader� problem. I have to restart tomcat server then to restart my web app.
    Does anyone know how to fix it?
    Thank you in advance!
    ////////////////////////////////////my native function class, a singleton class////////////////////////////////
    package haspkey.api;
    import java.util.Collection;
    import java.util.Vector;
    import haspkey.HardwareSecurityKey;
    Public class HaspKeyAPI {
    Public static final int KEYEXIST = 1;
    //A Singleton Class
    private static HaspKeyAPI haspKeyAPI;
    private HaspKeyAPI()
    public static HaspKeyAPI getSingletonObject()
    if ( haspKeyAPI== null)
    haspKeyAPI = new HaspKeyAPI();          
    return haspKeyAPI;
    public Object clone()
         throws CloneNotSupportedException
    throw new CloneNotSupportedException();
    /**********use native functions to call hasp C API***********/
    public native int keyPresent(int password1, int password2);
    public native int getId(int password1, int password2);
    public native void readBlock(int startMemoryLocation, int size,
    byte[] block, int password1, int password2);
    public native void writeBlock(int startMemoryLocation,int size, byte[] block, int password1,
    int password2);
    public native boolean decodeData(int size, byte[] block, int password1,
    int password2);
    public native boolean encodeData(int size, byte[] block, int password1,
    int password2);
    static {
    System.loadLibrary("HaspKeyAPI");
    private int getPrivMachineSpeed(boolean decrypt, int pass1, int pass2, String MLOCRTypeCode){
    byte[] block = new byte[8];
    int privMachineSpeed = 0;
    boolean isNumeric = true;;
    readKeyMemory(40,8,block, decrypt, pass1, pass2);
    if(block.length!=8){
    return -1;
    }else{
    String s = new String(block);
    for(int n=0; n<3; n++){
    if(s.charAt(n)<48 || s.charAt(n)>57){
    isNumeric = false;
    if(isNumeric){
    privMachineSpeed = Integer.parseInt(s.substring(0,3));
    return privMachineSpeed;
    public HardwareSecurityKey getHardwareSecurityKey(boolean decrypt, int pass1, int pass2, String AuthorizationCodes,String MLOCRTypeCode){
    HardwareSecurityKey key = new HardwareSecurityKey();
    if(keyPresent(pass1,pass2)==KEYEXIST){
    key.setPrivKeyID(getId(pass1, pass2));
    key.setPrivMachineSpeed(getPrivMachineSpeed(true, pass1,pass2, MLOCRTypeCode));
    }else{
    return null;
    /////////////////////////////// a class include some static final information to call the native function///////////////
    import com.bowebellhowell.haspkey.api.HaspKeyAPI;
    import com.bowebellhowell.winsort.vo.haspkey.HardwareSecurityKey;
    public class HaspKey{
    public static final String MLOCRTypeCode ="mmmmmmmmmmmmmmm";
    public static final String AuthorizationCodes = "bbbbbbbbbbbbbbbb";
    public static final int p1 = 0;
    public static final int p2 = 0;
    public static HardwareSecurityKey getHardwareSecurityKey(){
    HaspKeyAPI key = HaspKeyAPI.getSingletonObject();
    return key.getHardwareSecurityKey(true,p1,p2,AuthorizationCodes,MLOCRTypeCode);
    /////////////////////////////////// a servlet to call native function///////////////////////////////////
    public class LogonAction extends Action {
         public ActionForward execute(
              ActionMapping mapping,
              ActionForm form,
              HttpServletRequest request,
              HttpServletResponse response)
              throws Exception {
              int n = HaspKey.isKeyPresent();
              if(n!=1){
              if(n==2){
              message = "KeyDriverNotMatch";          
              }else if(n==3){
              message = "KeyOldModel";
              }else if(n==4){
              message = "KeyPasswordNotMatch";
              }else if(n==-1){
              message = "keyNotExist";
              request.getSession().setAttribute("message",message);
    java.lang.UnsatisfiedLinkError: Native Library C:\eclipse\workspace\HaspKey\SharedLib\HaspKeyAPI.dll already loaded in another classloader
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1551)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1511)
    at java.lang.Runtime.loadLibrary0(Runtime.java:788)
    at java.lang.System.loadLibrary(System.java:834)
    at haspkey.api.HaspKeyAPI.<clinit>(HaspKeyAPI.java:76)
    at util.HaspKey.isKeyPresent(HaspKey.java:35)
    at LogonAction (LogonAction .java:65)

    Hi EveryBody:
    i working in 2 servlets, these servlets import a login.jar library and login.jar call to Login.dll (a native Library)
    then. when i start second servlet i have this message
    java.lang.UnsatisfiedLinkError: Native Library dllLogin.dll already loaded in another classloader
    i read about class loader and i know about a only one load for native library but i don't know how resolve this exception because both servlets need dllLogin.dll to validate the user
    please anybody knows how or have any idea?
    Kind Regards
    Edson
    --sorry i know. my english is very bad                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Native library loading problem

    Hi Folks,
    I currently downloaded, and compiled the bDB core using VS 2010 x64 (I run 64 bit win7, and JRE 64 bit). In Eclipse I'm trying to use the native library (setting up the path correctly), however the java is complaining that it cannot find dependencies.
    I switched to JE, it works fine, but I'm not sure if JE is as performant as the core version. Anybody had the same problem?
    thanks in advance
    Edited by: user5493457 on Mar 22, 2011 3:35 AM

    Hi,
    Please review the building process of the Berkeley DB libraries, to ensure you have correctly built them. Review Building Berkeley DB for Windows, Building the Java API and Java configuration. If you want to build 64-bit libraries, make sure you select x64 as platform configuration in Visual Studio when building.
    I assume you are getting a java.lang.UnsatisfiedLinkError exception at runtime. Just to make sure Eclipse correctly finds the native BDB libraries, in your Run Configuration for the project you're trying to run, under Environment, add a new variable, LD_LIBRARY_PATH with a value of something like D:\BerkeleyDB\db-5.1.25\build_windows\x64\Debug (substitute Debug with Release depending on how you built the libraries) -- this is the path to the location of the native BDB libs, libdb51d.dll and libdb_java51d.dll (or libdb51.dll and libdb_java51.dll), so you should change it as appropriate for your system.
    Also, for that Run Configuration add a new variable, CLASSPATH with a value of something like D:\BerkeleyDB\db-5.1.25\build_windows\x64\Debug\db.jar;D:\BerkeleyDB\db-5.1.25\build_windows\x64\Debug\classes (this is the path to the Java API classes and the Java API jar file -- db.jar). Make sure that "Append environment to native environment" option is checked, in the Run Configurations screen.
    Regards,
    Andrei

  • [XMLType]Native Library already loaded

    Hi !
    I work with oracle DB 9.2.0.3 and J2ee server.
    I connect to the db with JDBC driver (oci8 client)
    When I use the method CreateXML method (XDB.jar package) I have this error :
    java.lang.UnsatisfiedLinkError: Native Library D:\oracle\ora92\bin\orageneric9.dll already loaded in another classloader
    I have to shutdown and reopen my J2ee server ...
    Any Idea ?

    If you use the session of the myserver1, then store some value in session to identify that the library is loaded.
    As a first step in myserver2, Check in session whether the value is set.
    If you cannot propagate session information across myserver1 and myserver2, then
    myserver1:
    static
    loadLibrary("YourDLL")
    "Include this here..........."
    This code will be there in some class
    "Include this here..........."
    Just write in ser file that DLL is loaded.
    myserver2:
    static
    checkWhetherAlreadyLoaded();
    loadLibrary("YourDLL");
    Or have the loading of library alone in a class in a static method.
    public class LoadClass
    public static loadLibrary()
    System.loadLibrary("YourDLL");
    In myserver1, just call this.
    In myserver2, before calling this method,
    just call any native method - a test method will do
    public boolean checkLoadedStatus()
    try
    // Call the testing nativemethod.
    catch(UnsatisfiedLinkerError e)
    try
    LoadClass.loadLibrary();
    return true;
    catch(Exception e)
    return false;
    }

  • Specify native library in java command line

    My application is :
    1. packed into 1 jar file
    2. use sqljdbc4.jar
    2. use a native library: "Microsoft SQL Server JDBC Driver 3.0".(use it in Ecplise and it works fine)
    3. run by this command: "java -jar myapp.jar".
    java version is jdk1.6.0_23
    btw: I config all the class paths in the manifest.mf file
    My application is failed to run, since it cannot find the native library. How/where to specify the native library location?

    -Djava.library.path

  • Deploy project using  Jdeveloper with native library (dll)

    hi
    i need to deploy project using Jdeveloper but the generated jar dose not include native library dll file .

    it is ok now
    using deployment in properties of project and add new file group of type dependency analysis

  • Will WLS start 32-bit or 64-bit native library?

    After installing the generic WLS 10.3.4 on HP Itanium platform (64bit), I got both 32-bit and 64-bit native libraries. At runtime, which native library will be used? Is WLS smart enough to pick the right one depending on the JVM I am using? Is it that if I have 32-bit JVM then WLS will pick 32-bit native library at runtime?
    Edited by: user702439 on Feb 7, 2011 7:56 PM

    Hi,
    If you are using 64 bit operating system then you must consider following things to make sure that the corre ct 64-bit libraries gets loaded by WLS:
    *1).* For 64 bit installation always use Generic Jar Installers: http://middlewaremagic.com/weblogic/?p=2731
    *2).* While using Generic Jar installer Make Sure that you already has 64-Bit JDK installed in your Box where you want to install WLS.
    *3).* In LINUX Compatible JDKs you will find a JAVA_OPTION "-d64" which can be used to instruct JDK to run in 64 bit mode while Installing the WLS using generic Jar like following:
    JAVA_HOME/bin/java -d64 -Xmx1024m -jar wls1034_generic.jar
    If you follow above points then WLS is smart enough to pick the correct Libraries in the java.library.path...But if you donot follow above points then your WLS might be using 32 bit libraries and you may receive some WARNING while booting up your server complaining regarding the Libraries and Native IO related messages.
    Thanks
    Jay SenSharma

  • Publish a native library

    I am trying to load a native library to be used among many applications in a wls, but I am getting UnsatisfiedLinkError if loaded the library by one application and try to use it by another.
    Please if anyone knows how to get this implementation working, I really appreciate it!!

    hello all
    i cann't find out (or don't understand) the way what i need. i mean how can i copy the dll file(s) in the windows system diractory? i can put the dll in the jar file then how can i copy that dll after extract?
    "daney" said that he have done it.
    This certianly is possible. I have done it.
    You have to extract the dll from the jar file and write it to a temporary >file in the file system. Then call System.load() on the file you just >extracted.
    Do you want to delete the temporary file when you are done with it? >That is a bit more difficult, but it is possible if you use a ClassLoader >to run your code containing native methods.anybody have any idea how he has done? please give some details if anyone have worked on it before.i am waiting for the solutions.
    thanks
    bashar

  • Web Start does not extract native library

    Hi there,
    we�ve been deploying our application through web start for about a year, yet. And we are in the "lucky" situation, that all customers are running windows and indentical JREs.
    A few weeks ago we switched from 1.4.2_08 to 1.5.0_03. Our customers (pre-)install our application by using the -import option of web start, which downloads fine. But recently, we receive more and more error reports, that a call to a native library fails, when the application is first run.
    Thus we inspected the users' web start cache and found out, that though the jar containing our native lib was downloaded into the cache, but the contained dll is not extracted.
    The extracted dll usually resides in a directory RM*.jar in the cache. And of course, as it isn't there, the call to the library fails.
    But the question is, why web start does not extract the dll in some cases? Unfortunately we were not able to reproduce this situation locally, so we're limited to our customers' reports.
    Btw. the dll is in the jar's root directory and the jar itself (as well as all other application jars) is signed.
    Any suggestions?
    Clearing the cache and donwloading again solves the problem, but might not be suitable for users that repeatedly need to download 10 megs with an isdn dial-up connection... :-/
    Thanks in advance!
    tdecem

    To try to reproduce the original problem, remove the deployment.properties file from the <application data>\Sun\Java|Deployment directory, then run 1.4.2 with you app. The upgrade to 1.5.0.
    The cache will only be upgraded if deployment.properties file indicates that it has never been run with 1.5.0, so if you have had 1.5.0 insalled on a system, and then you remove it, the cache may never be upgraded unles the deployment.property file is removed and then used with 1.4.2.

  • Problems with loading native library/missing methods:no ttJdbcCS in java.li

    Iam facing one problem while connecting the timesten client to the server The SQL Exception which Iam getting is pasted below:-
    Problems with loading native library/missing methods: no ttJdbcCS in java.library.path
    I am working with MAC OS X 10.7.2 and my timesten client version is 11.2.1.0
    I have also changed the Java Preferences from 64-bit to 32-bit but still whenever i tried to connect with the SQL Developer it gives me the above error.

    I just tried this out. My environment is OS X 10.7.4, Timesten (32-bit) client 11.2.1.9.0, SQL Developer 3.1.07, Oracle Java 1.7.0_04.
    The key things you need to be sure to do (in a terminal window) are:
    1. Be sure to . in the TimesTen environment script <tt_install_dir>/bin/ttenv.sh to set the full TT environment.
    2. Change directory to SQLDeveloper.app/Contents/Resources/sqldeveloper
    3. Run 'sh sqldeveloper.sh -J-d32'
    and all should be fine.
    Note that if you are using Java7 as I am then there is a step 1a. Change the CLASSPATH environment variable to specify ttjdbc6.jar not ttjdbc5.jar. For some reason running the app directly from Finder does not work even if you add -J-d32 into the sqldeveloper launch script. I'm still looking into that.
    Chris

  • Executing native library under Java - shell script problem

    I am running a Java application on the command line bash shell. I have a few JAR files in the directory and a few native libraries. When I run the application using the command line, all works fine. This is the command I use:
    java -classpath MyGame.jar:log4j-1.2.16.jar:jme/jme-colladabinding.jar:jme-audio.jar:jme-awt.jar:jme-collada.jar:jme-editors.jar:jme-effects.jar:jme-font.jar:jme-gamestates.jar:jme-model.jar:jme-ogrexml.jar:jme-scene.jar:jme-swt.jar:jme-terrain.jar:jme.jar:jogl/gluegen-rt.jar:jogl/jogl.jar:jorbis/jorbis-0.0.17.jar:junit/junit-4.1.jar:lwjgl/jinput.jar:lwjgl/lwjgl.jar:lwjgl/lwjgl_util.jar:lwjgl/lwjgl_util_applet.jar:swt/windows/swt.jar:jbullet/jbullet-jme.jar:jbullet/asm-all-3.1.jar:jbullet/jbullet.jar:jbullet/stack-alloc.jar:jbullet/vecmath.jar:trove-2.1.0.jar:sceneMonitor/jmejtree_jme2.jar:sceneMonitor/propertytable.jar:sceneMonitor/scenemonitor_jme2.jar:sceneMonitor/sm_properties_jme2.jar -Djava.library.path="lwjgl/native/linux" -Xmx1024m -Xms768m -ea com.mygame.MainThis works fine and the application starts up as expected. LWJGL native library is loaded in and works fine as expected.
    The problem occurs when I try to run this command via the shell using a shell script. Here is my script:
    #!/bin/bash
    # Set the minimum and maximum heap sizes
    MINIMUM_HEAP_SIZE=768m
    MAXIMUM_HEAP_SIZE=1024m
    if [ "$MYAPP_JAVA_HOME" = "" ] ; then
        MYAPP_JAVA_HOME=$JAVA_HOME
    fi
    _JAVA_EXEC="java"
    if [ "$MYAPP_JAVA_HOME" != "" ] ; then
        _TMP="$MYAPP_JAVA_HOME/bin/java"
        if [ -f "$_TMP" ] ; then
            if [ -x "$_TMP" ] ; then
                _JAVA_EXEC="$_TMP"
            else
                echo "Warning: $_TMP is not executable"
            fi
        else
            echo "Warning: $_TMP does not exist"
        fi
    fi
    if ! which "$_JAVA_EXEC" >/dev/null ; then
        echo "Error: No Java environment found"
        exit 1
    fi
    _MYAPP_CLASSPATH="MyGame.jar:log4j-1.2.16.jar:jme/jme-colladabinding.jar:jme-audio.jar:jme-awt.jar:jme-collada.jar:jme-editors.jar:jme-effects.jar:jme-font.jar:jme-gamestates.jar:jme-model.jar:jme-ogrexml.jar:jme-scene.jar:jme-swt.jar:jme-terrain.jar:jme.jar:jogl/gluegen-rt.jar:jogl/jogl.jar:jorbis/jorbis-0.0.17.jar:junit/junit-4.1.jar:lwjgl/jinput.jar:lwjgl/lwjgl.jar:lwjgl/lwjgl_util.jar:lwjgl/lwjgl_util_applet.jar:swt/windows/swt.jar:jbullet/jbullet-jme.jar:jbullet/asm-all-3.1.jar:jbullet/jbullet.jar:jbullet/stack-alloc.jar:jbullet/vecmath.jar:trove-2.1.0.jar:sceneMonitor/jmejtree_jme2.jar:sceneMonitor/propertytable.jar:sceneMonitor/scenemonitor_jme2.jar:sceneMonitor/sm_properties_jme2.jar"
    _VM_PROPERTIES="-Djava.library.path=\'lwjgl/native/linux\'"
    _MYAPP_MAIN_CLASS="com.mygame.Main"
    $_JAVA_EXEC -classpath $_MYAPP_CLASSPATH $_VM_PROPERTIES -Xmx${MAXIMUM_HEAP_SIZE} -Xms${MINIMUM_HEAP_SIZE} -ea $_MYAPP_MAIN_CLASSThe shell script is in the same directory as the JAR files (the same directory where I ran the Java command above). When I execute the shell script ( sh MyGame.sh ), I get the UnsatisfiedLinkError message:
        14-Feb-2011 19:46:28 com.wcg.game.DefaultUncaughtExceptionHandler uncaughtException
        SEVERE: Main game loop broken by uncaught exception
        java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
           at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
           at java.lang.Runtime.loadLibrary0(Runtime.java:823)
           at java.lang.System.loadLibrary(System.java:1028)
           at org.lwjgl.Sys$1.run(Sys.java:73)
           at java.security.AccessController.doPrivileged(Native Method)
           at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
           at org.lwjgl.Sys.loadLibrary(Sys.java:82)
           at org.lwjgl.Sys.<clinit>(Sys.java:99)
           at org.lwjgl.opengl.Display.<clinit>(Display.java:130)
           at com.jme.system.lwjgl.LWJGLDisplaySystem.setTitle(LWJGLDisplaySystem.java:118)
           at com.wcg.game.WcgStandardGame.initSystem(WcgStandardGame.java:287)
           at com.wcg.game.WcgStandardGame.run(WcgStandardGame.java:185)
           at java.lang.Thread.run(Thread.java:662)I don't understand what I am doing wrong. I am executing the exact same command via a shell script and it is not working. Any ideas, solutions, most welcome.
    I am running Linux Mint Debian 201012, Linux mint 2.6.32-5-amd64 #1 SMP Thu Nov 25 18:02:11 UTC 2010 x86_64 GNU/Linux. JDK is 1.6.0_22 64-bit. I have 64-bit .so files in the correct place too.
    Thanks
    Riz

    Thanks for the replies guys/gals.
    I have modified the script and echoed my command that should be running under the shell script, it is:
    java -classpath WcgFramework.jar:WcgPocSwordplay.jar:log4j-1.2.16.jar:jme/jme-colladabinding.jar:jme-audio.jar:jme-awt.jar:jme-collada.jar:jme-editors.jar:jme-effects.jar:jme-font.jar:jme-gamestates.jar:jme-model.jar:jme-ogrexml.jar:jme-scene.jar:jme-swt.jar:jme-terrain.jar:jme.jar:jogl/gluegen-rt.jar:jogl/jogl.jar:jorbis/jorbis-0.0.17.jar:junit/junit-4.1.jar:lwjgl/jinput.jar:lwjgl/lwjgl.jar:lwjgl/lwjgl_util.jar:lwjgl/lwjgl_util_applet.jar:swt/windows/swt.jar:jbullet/jbullet-jme.jar:jbullet/asm-all-3.1.jar:jbullet/jbullet.jar:jbullet/stack-alloc.jar:jbullet/vecmath.jar:trove-2.1.0.jar:sceneMonitor/jmejtree_jme2.jar:sceneMonitor/propertytable.jar:sceneMonitor/scenemonitor_jme2.jar:sceneMonitor/sm_properties_jme2.jar -Djava.library.path="lwjgl/native/linux" -Xmx1024m -Xms768m -ea com.mygame.MainI am more confident that now the shell script should be fine (I am a shell script noob) because this very command if I copy from terminal and paste into the terminal, runs the application no problem at all. But I am amazed that it is still not working. I must be doing something obviously wrong. :-(
    I used the code as suggested:
    _VM_PROPERTIES='-Djava.library.path="lwjgl/native/linux"'I am stumped!? :-(
    Thanks for help.

  • Can I create more than one instance of a native library?

    Hello all,
    I am using Java to access a Win32 DLL with JNI. Everything is working fine, but I have several threads using the same instance of the native library because it is loaded "statically" in the Java class which uses it, and I suspect I am getting a bottle-neck at the native library.
    Does anyone know if there is any way to load more than one "instance" of a native library?
    The use of System.loadLibrary() would indicate not, and my (limited) knowledge of the Windows environment would tell me that a "shared" library only has on instance. (confirm anyone?)
    I need to find a way around this bottle-neck issue... (and "no", before anyone suggests it, I can't ditch Windows!)
    Thanks.

    I am not sure about the behaviour of the dll as it's not mine. It's a COM DLL which I have "wrapped" in a standard windows DLL so I can expose the JNI methods. I assume because it's COM that it IS reentrant, but I am a bit of a novice when it comes to Windows and COM. I didn't install the COMponent either, it was installed as part of another application. (It's an antivirus COM dll that is part of an AV application)
    Thanks for your help though, I think I will just have to live with it.

Maybe you are looking for

  • Error while doing AUC Settlement

    Dear All While doing settlement of Asset using transaction code AIBU, I am getting the following error: Balance in transaction currency Message no. F5702 Diagnosis A balance has occurred in transaction currency 'INR' with the following details: Excha

  • Application builder-run time error

    I cannot run my exe file I have always the following message , see attachment. What can be the problem? Attachments: run-time engine error.jpg ‏42 KB

  • HELP! my iphone is showing up as someone elses

    hi, i just synced up my iphone 4 with my wife's imac , trying to put some of my photos into her iphot. something terribly went wrong. all i remember was a progress bar was doing something on my phone, i paniced and i pulled my phone out of the comput

  • BADI  that is called when we create shopping cart

    Hi all, Can any one tell me the BADI that is called when we order a shopping cart. Thanks&Regards, Hari

  • Time Machine/Capsule -- 2.93GHzx -- and another question.

    I upgraded my PowerBook G4 (1.67GHz and 2 GB DDR2 SDRAM) from Tiger to Leopard 10.5.6. I did so largely to get Time Machine. And then I ran into all sorts of woes doing my back-ups. So I took another step and replaced my external 2TB Lacie drive (tha