JNI Question Executing Question

Dear member,
I have my C invocation program and Java executable on a Solaris 8 machine using SDK 1.2; I also have the permission on the C executable set as "chmod dm_check 6750". I have changed the owner to "root" and changed the group to "topic". The 6750 gives the file the following permissions: " 64 -rwsr-s--- 1 root topic 30896 Jul 31 01:05 dm_check". There is an another application which runs this C program transparent to the user, i.e., this C program integrates with another application. When this application tries to call this C program as user "dmadmin", the application cannot invoke the C program.
When I run the C program from the command line as "root" or "dmadmin", I get an error that a library file cannot be found; however, I have added to the LD_LIBRARY_PATH the necessary directory "/usr/lib:/vx00/ora/app/product/9iv2/jdk/jre/lib:/vx00/ora/app/product/9iv2/jdk/jre/lib/sparc:" for both "root" and "dmadmin". Can anyone suggest an alternative solution?

I had a similar problem, I think there might be another env variable besides LD_LIBRARY_PATH. I can't tell you what it is because I am working the my Windows Partition right now. Also it could be something in your makefile too. Sorry I wish I could be more help. If this does not help post and when I go over to the linux parition I check a project I was working on and see what the other env variable was.

Similar Messages

  • JNI Question

    hope someone can help me with this because I have to get this working today. I am pulling my hair out, and I have little to begin with.
    I am trying to compile the C program, invoke.c, that comes as part of the "Invoking the Java Virtual Machine" tutorial. The issue I am having trouble getting past is: On Solaris I am getting the following errors:
    invoke.c:23: request for member `version' in something not a structure or union
    invoke.c:28: request for member `classpath' in something not a structure or union
    invoke.c:29: request for member `classpath' in something not a structure or union
    invoke.c:32: warning: passing arg 2 of `JNI_CreateJavaVM' from incompatible pointer type
    On Windows 2000 with a Visual C++ 6.0 compiler I am getting the following issues.
    #include <jni.h>
    #ifdef _WIN32
    #define PATH_SEPARATOR ';'
    #else /* UNIX */
    #define PATH_SEPARATOR ':'
    #endif
    #define USER_CLASSPATH "." /* where Prog.class is */
    main()
    JNIEnv *env;
    JavaVM *jvm;
    JDK1_1InitArgs vm_args;
    jint res;
    jclass cls;
    jmethodID mid;
    jstring jstr;
    jobjectArray args;
    char classpath[1024];
    vm_args.version = 0x00010001;
    JNI_GetDefaultJavaVMInitArgs(&vm_args);
    sprintf(classpath, "%s%c%s",
    vm_args.classpath, PATH_SEPARATOR, USER_CLASSPATH);
    vm_args.classpath = classpath;
    res = JNI_CreateJavaVM(&jvm, &env, &vm_args);
    if (res < 0)
    fprintf(stderr, "Can't create Java VM\n");
    exit(1);
    cls = (*env)->FindClass(env, "Prog");
    if (cls == 0)
    fprintf(stderr, "Can't find Prog class\n");
    exit(1);
    mid = (*env)->GetStaticMethodID(env, cls, "main", "([Ljava/lang/String;)V");
    if (mid == 0)
    fprintf(stderr, "Can't find Prog.main\n");
    exit(1);
    jstr = (*env)->NewStringUTF(env, " from C!");
    if (jstr == 0)
    fprintf(stderr, "Out of memory\n");
    exit(1);
    args = (*env)->NewObjectArray(env, 1, (*env)->FindClass(env, "java/lang/String"), jstr);
    if (args == 0)
    fprintf(stderr, "Out of memory\n");
    exit(1);
    (*env)->CallStaticVoidMethod(env, cls, mid, args);
    (*jvm)->DestroyJavaVM(jvm);
    }

    It looks like you are not compiling the code with the required header files. Can you cut and paste the command you are executing

  • JNI Question 2

    Hello again,
    I am seeing an intermittent error come up that's hanging my application. This is occurring when I make the following call into my cocoa library using Java JNI:
    JNIEXPORT jint JNICALL JavaMacTaskTrayIconcreateTaskTrayIcon(JNIEnv* env, jobject caller, jstring iconFilePath)
    NSStatusItem * statusItem = [[NSStatusBar systemStatusBar]
    statusItemWithLength:NSVariableStatusItemLength];
    Here's the error I see:
    2006-07-18 10:02:49.821 java[6511] * Assertion failure in -[NSViewHierarchyLock unlockTopMostReader], AppKit.subproj/NSViewHierarchyLock.m:444
    2006-07-18 10:02:49.822 java[6511] Apple AWT Startup Exception : Invalid parameter not satisfying: th
    2006-07-18 10:02:49.822 java[6511] Apple AWT Restarting Native Event Thread
    I've elminated all other code in my cocoa library and still get the problem, so I have isolated the problem to the one call listed above.
    Since this error occurrs intermttently, I think that it's some kind of threading issue. When java calls into JNI, should I move the NSStatusItem creation call to some other privileged thread, or do I need to acquire some kind of lock before making the call?
    Any input would be appreciated.
    Many Thanks,
    Patrick Arnesen
    VivraTerra Software Corp.
      Mac OS X (10.4.6)  

    Hi
    A google search of this error indicates that it appears from time to time and can be quite difficult to tie down, however, it appears to have nothing to do with JNI.
    On one forum I saw this comment in relation to this error:
    "The most common cause is unmatched -[NSView unlockFocus] invocations."
    http://www.cocoabuilder.com/archive/message/cocoa/2006/1/11/154180
    If this can shed some light on your problem then great, otherwise I suggest you put the error message into google and see if the responses can help you.
    Good luck
    Bob

  • JNI question about EnumChildWindows

    I originally wrote a java app that would run in Linux and play some video files using MPlayer. MPlayer has an option to take a window id and will pile video through to the window you specify. I was able to use the xwininfo command and a unique window name to create a JFrame in my app to paint the video to.
    When using xwininfo command it gave me 2 child components of the JFrame, the inner most child was the one necessary to use MPlayers -wid feature and successfully view the video.
    Now I am faced with the problem of making this work in windows. I have successfully written JNI code to get the JFrame 's hwnd, unfortunately I can't seem to get EnumChildWindows to work properly. When I call the function the callback never gets called (code below). Are the JFrames different in windows with no child components? or have I missunderstood what the EnumChildWindows function will do? Is there a better function to be using?
    Thanks!
    PS. I know the methods are UGLY. I call getHwndChild( parentHwnd) followed by looping through the getHwndIndex() function while the result != 0 but they are all never anything but 0
    java methods
    public static native int getHwndChild( int parentHwnd );
    public static native int getHwndIndex( int index );JNI code
    int childhwnds[ 100 ];
    int childhwndindex;
    BOOL CALLBACK cwcb( HWND hwnd, LPARAM lparam )
         childhwnds[ childhwndindex ] = ( int ) hwnd;
         childhwndindex = childhwndindex + 1;  
         return TRUE;
    JNIEXPORT jint JNICALL Java_com_laancor_win32_JUtil_getHwndChild(JNIEnv *env, jclass obj, jint parentHwnd, )
         HWND hwnd = NULL;
         const char *str = NULL;
         int i;
         // clear hwnd array
         childhwndindex = 0;
         for ( i = 0; i < 100; i++)
              childhwnds[ i ] = 0;
         EnumChildWindows( (HWND)parentHwnd, cwcb, NULL );
         return (jint) 0;
    JNIEXPORT jint JNICALL Java_com_laancor_win32_JUtil_getHwndIndex( JNIEnv *env, jclass obj, jint index )
        return (jint) childhwnds[ (int)index ];
    }

    I want to show a child window on top of its parent. The parent gets hidden before. When i show the parent again the child is still hidden.
    I try to use JNATIVE.
    Thats the code i tried so far. Of course it's not working.
    Would you explain what I have to do? (I already spend a lot time by searching the internet)
                        Callback c = new Callback() {
                            private int address = 0;
                            @Override
                            public int callback(long[] arg0)
                                // ??? what code here?
                                System.out.println("test");
                                return 0;
                            @Override
                            public int getCallbackAddress() throws NativeException
                                if (address == 0)
                                    address = JNative.createCallback(0, this);
                                return address;
                        boolean succeed = User32.EnumChildWindows(cc.getHandle(), c, 0);
                        JNative.releaseCallback(c); //???Would be very pleased about help. Regards.

  • JNI Question,help me thx!!

    Setp1:
    //Setdisp.java
    class Setdisp {    
    public native static void greeting();
    static {         
    System.loadLibrary("Setdispdll");
    Setp2:
    cmd>javac Setdisp.java
    Setp3:
    cmd>javah Setdisp
    Setp4:
    /*Setdisp.c
    * DO NOT EDIT THIS FILE - it is machine generated
    #include <jni.h>
    #include <windows.h>
    /* Header for class Setdisp */
    #ifndef IncludedSetdisp
    #define IncludedSetdisp
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class: Setdisp
    * Method: greeting
    * Signature: ()V
    JNIEXPORT void JNICALL Java_Setdisp_greeting
    (JNIEnv * env, jclass cl) {
    DEVMODE Mode;
    EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &Mode);
    Mode.dmPelsWidth = 800; //screen width
    Mode.dmPelsHeight = 600; //screen height
    Mode.dmDisplayFrequency =75; //screen bits
    if (ChangeDisplaySettings(&Mode,CDS_TEST)==DISP_CHANGE_SUCCESSFUL)
    ChangeDisplaySettings(&Mode, 0);
    #ifdef __cplusplus
    #endif
    #endif
    Setp5:
    cmd>cl -IF:\jdk\include -IF:\jdk\include\win32 -LD Setdisp.c -FeSetdisp.dll
    errors:
    Setdisp.obj : error LNK2001: unresolved external symbol __imp__ChangeDisplaySett
    ingsA@8
    Setdisp.obj : error LNK2001: unresolved external symbol __imp__EnumDisplaySettin
    gsA@12
    Setdisp.dll : fatal error LNK1120: 2 unresolved externals
    Why ??
    Help me,thank you very much!

    are you sure you are linking to user32.dll?

  • JNI Com CoCreateInstance VM crash

    I'm trying to use the ActiveHome SDK for use in a project. The SDK is written in vb and c++. I have set up a a main class inside of my JNI wrapper to test the logic. I also set up a main class in the Java class, the test class in c++ works well when I call:
    hresult = CoCreateInstance( __uuidof(ActiveHomeScriptLib::ActiveHome), NULL, CLSCTX_INPROC_SERVER, __uuidof(ActiveHomeScriptLib::IActiveHome), (LPVOID *) &pActiveHome );however this is where java is dieing. I have tried to instead call CoCreate this way:
    hresult = CLSIDFromProgID(OLESTR("ActiveHomeScriptLib.ActiveHome"), &clsid);
    hresult = CoCreateInstance(clsid,NULL,CLSCTX_INPROC_SERVER,__uuidof(ActiveHomeScriptLib::IActiveHome),(LPVOID *) &pActiveHome);This doesnt crash the JVM but it cannot find the OLESTR in the dll using this method.
    Any help would be greatly appreciated.

    karlmarxxx wrote:
    Perhaps you should have read my question, I have already created a class in c++ testing this out and it works, When I run the same code in java the JVM crashes.Sorry the scrolling to see everything in single line obscured it.
    Presumably when you say crash you mean a windows system error dialog versus just an exit.
    When you created the C++ did you use default settings in VC from the console and for creating the jni dll?
    Presumably you are doing nothing else in terms of JNI except executing that line via a JNI method?

  • Is it possible to call c# dll using JNI

    Using JNI we can invoke native code written in c or c++.
    Steps:
    1) All we have to do is write a class and have a method of type native.
    2) Invoke javah with -jni option to create a .h file.
    3) Include this header file and implement the method in c or c++ code.
    Now my question is:
    Is it possible to call I want to know whether we can implement the native method in c# instead of c or c++.
    Thanks

    No you can't, but you can have the JNI C/C++ code call C# code. How to do that is no longer a JNI question but a C# question.

  • How to solve these Errors when generating .dll (using JNI) ?

    Hello,
    I am very new about JNI. As I have been trying to generate my dll (sysHook.dll) as I followed this topic http://forums.sun.com/thread.jspa?threadID=632369 (by Jbgohlke ) by putting this command:
    cl -I"C:\Program Files\Java\jdk1.6.07\include" -I"C:\Program Files\Java\jdk1.6.07\include\win32" sysHook.cpp -FesysHook.dll Then many errors are popped up as follows:
    sysHook.obj :error LNK2019: unresolved external symbol __imp__CallNextHookEx@16 referenced in function "long__stdcall HookKeyboardProc(int,unsigned int,long)" (?HookKeyboardProc@@YGHIJ@Z)
    sysHook.obj :error LNK2019: unresolved external symbol __imp__SetWindowsHookExA@16 referenced in function " void__cdecl Init(void)" (?Init@@YAXXZ)
    sysHook.obj :error LNK2019: unresolved external symbol __imp__UnHookWindowsHookEx@4 referenced in function "void__Cleanup(void)" (?Cleanup@@YAXXZ)
    sysHook.dll : fatal error LNK1120: 3 unresolved externals
    If anyone of you know this PLEASE!! point me out!!
    [email protected]
    Thanks in advance

    Specify the appropriate library when linking.
    This is not a JNI question. It is a Windows/C/C++ programming question.
    Locking this thread.

  • JNI via Server-Side Language

    I'd like to use the following post as a reference: http://72.5.124.102/thread.jspa?threadID=788137&messageID=4479784
    "The DLL will remain loaded between calls, so if you use a global variable to store the connection then it should be ok. "
    Of course this makes logical sense. However, JNI doesn't have a handle from my understanding... JNI looks like this:
    private native void nativeMethodInvoke();
    static {
        System.load(path+dllName) // many alts to this, but yea.
    // somewhere in main thread....
    SelfClass varRefToSelf=new SelfClass();
    // where SelfClass is the current class running.
    // This doesn't make sense to me, considering usage of 'this' - so if anyone can explain that, I would greatly appreciate it.
    varRefToSelf.nativeMethodInvoke();So.... am I supposed to keep a global reference within my class, to itself?!?
    The actual problem is that I'm using a server-side language to invoke Java, and thus C++ via JNI. However, the server-side language is creating a new instance of the JAR upon each invocation. So my plan was to pass a reference to the module handle, and somehow manage to get that back to server-side language, and then furthermore back to Java JNI. Am thinking about moving to a servlet instead, since this doesn't appear to be possible - as unfortunate as that is.
    Would SingleThreadModel work in this case? Or should I have C++ thread itself, so when Java makes a call, I can let C++ handle data by forwarding to correct module in memory? Assuming the above mentioned post is accurate, then the DLL, when loaded by Java, will stay in memory until unloaded. If the jvm is exiting after each server-side invocation, I must assume multiple instances of the dll are being created. So, am thinking this prospect will work... servlets aside...
    Any help is appreciated. I clearly do not understand JNI as well as I should.
    *Edit:
    I have already tried this, and found that C++ DLL's thread is definitely active in memory post-jvm exit. The DLL also appears to be loaded multiple times, as the data I'm dealing with appears to be unique, in that it's not "stepping into itself" and overwriting pointers, or anything.
    Am I going to have to create an instance of my class, via itself, to launch itself in the jvm manually - to keep the reference to dll in memory?
    Although that statement sounds terribly redundant... I believe it's accurate...
    1.) Create instance of class that's called by server-side, launch it under new jvm
    2.) Have orig class return to server-side as normal, and forward any new requests to the jvm-launched "self"; based on detection of class/jvm in memory...
    For being cross-platform "magical", Java sure makes it difficult to perform pretty basic tasks....

    Thanks for the great information jschell, this clears up alot. I'll play around with these new prospects and see if I can get this running properly.
    Also, let me define more what I'm actually doing.
    I'm using Railo, and a CFX "tag" to invoke a JAR. This Jar contains the JNI to execute a DLL's code. This dll's code is merely in place to perform some server tasks - mostly routine file maintenance, and checks to ensure normal operation. Some of this includes db queries. Yes this can be done in Java for the most part, but we plan to use the DLL exports later in a deployment scenario.
    So, "Did you mean it is loading the jar each time?", I do believe so. However, the instances appear to be different. If i were to create a thread within the JNI invoking class, which i have tried by the way, and create a global variable with some value, the second calling of the JAR file reports that it has not been defined yet on class initialization. Additionally, the thread I mentioned also halts, and does not exist within the second calling.
    Let me show some actual code...
    Test.cfm...
    <cfx_mytag Library="myLibrary.dll" task="function1">
    <cfscript>
    ... // do some stuff.
    </cfscript>If I were to alter that to:
    <cfx_mytag Library="myLibrary.dll" task="function1">
    <cfx_mytag Library="myLibrary.dll" task="function2">
    <cfscript>
    ... // do some stuff.
    </cfscript>I found that function2 in the same JAR, loaded via "cfx_mytag", reports inexistance of function1's execution - which registered a value into a global var.
    This is why I must assume that the JAR is being loaded independantly - each time. Correct me if wrong. Perhaps my terminology is off - the class within the jar file is multi-instanced, as far as I can tell. Or rather... Railo is creating mutliple instances of this class - and thus I lose my handle to my dll - every call... Seemingly at least.
    //Java...
    import com.allaire.cfx.*;
    public final class myClass implements CustomTag {
         private Request req;
         private Response res;
            public boolean igetresetoften;
         private native void gogoGadgetDLL();
         public myClass() {
        public void processRequest(Request request,Response response) throws Exception {
             this.req=request;this.res=response;
              if (!this.igetresetoften) {
                     igetresetoften=true;
                     res.write("yea... this is annoying");
                // in actual code - function1() assigns global var.
                // and function2() reports to response buffer the value of the global var , which is constantly false each run.
    }Notice the similarity to a servlet (request/response buffers). I've dealt with servlets, so I know that all requests are threaded.. but the global vars in a servlet are, in fact, ... global. Not in this case, it would seem.
    Thanks again, I'll let you know of my results, late tonight.
    Edited by: jSD7 on Nov 13, 2009 4:20 PM

  • Can I execute C code in current Thread(process)?

    Hi all,
    I want to execute a Linux command within current Thread, but Runtime.exec() will start a new process to execute the command specified.
    Does JNI can execute any system command or any C program in current Thread?
    BTW, I tried JNA, following code will start new process too:
    public interface CLibrary extends Library {
    CLibrary INSTANCE = (CLibrary)Native.loadLibrary((Platform.isWindows() ? "msvcrt" : "c"),CLibrary.class);
    void printf(String format, Object... args);
    void system(String cmd);
    public static void main(String[] args) {
         CLibrary.INSTANCE.system("sleep 5s");
    Can I execute the Linux command within current Thread with JNA?
    Any anwser will be appreciated!! Thanks!!
    Raymond Zeng
    Edited by: raymond.zeng on Dec 2, 2009 8:19 AM

    Hi sabre150,
    Thank you very much!
    In fact, the reason I want native code run in current process is that native code will lock some system resource(such as COM port), I want to manipulate that resource in Java code after calling native code. (native code may run in a new thread for a long time, in the same time, Java code may need to manipulate the resource in other thread)
    It is not import about whether start a new thread or not, but I really want the native code will be executed in a same process, so OS will not prevent me to manipulate that resource.
    Is there any smart solution to do this?
    Thanks!
    Raymond Zeng

  • NLS:4: Cannot open message catalog LIBWSC_CAT

    Hi
    I am not sure this is the right place to place my question. Please move it to right place.
    I have an application on the unix (Solaris 5.8) and tuxedo 8 on which it runs fine but if I am using linux system to run the same application which is written in java with my tuxedo servers up. After running the application I am getting the below error.
    ResourceException: NLS:4: Cannot open message catalog LIBWSC_CAT, set 1, num 1140; check TUXDIR=/home/lnx/env2/bea/tuxedo9.1, LANG=C
    Category: Communications Name: NLS:4: Cannot open message catalog LIBWSC_CAT, set 1, num 1140; check TUXDIR=/home/lnx/env2/bea/tuxedo9.1, LANG=C
    : Class: null
    Id: null Description: NLS:4: Cannot open message catalog LIBWSC_CAT, set 1, num 1140; check TUXDIR=/home/lnx/env2/bea/tuxedo9.1, LANG=C
    ResourceException: NLS:4: Cannot open message catalog LIBWSC_CAT, set 1, num 1140; check TUXDIR=/home/lnx/env2/bea/tuxedo9.1, LANG=C
    Category: Communications Name: NLS:4: Cannot open message catalog LIBWSC_CAT, set 1, num 1140; check TUXDIR=/home/lnx/env2/bea/tuxedo9.1, LANG=C
    : Class: null
    Id: null Description: NLS:4: Cannot open message catalog LIBWSC_CAT, set 1, num 1140; check TUXDIR=/home/lnx/env2/bea/tuxedo9.1, LANG=C
    ResourceException: NLS:4: Cannot open message catalog LIBWSC_CAT, set 1, num 1140; check TUXDIR=/home/lnx/env2/bea/tuxedo9.1, LANG=C
    at connection.jni.JNIInteraction.execute(JNIInteraction.java:334)
    at AccountLocateBean.get(AccountLocateBean.java:117)
    at JavaBeanExample1.main(JavaBeanExample1.java:155)
    I check my $TUXPATH and $TUXDIR points to the correct location.
    In the ULOG ,I can see the my server (on which the required service resides) has restarted (CMDTUX_CAT:580: INFO: A server process has restarted: 7932).
    I am not getting any core file with this error (limit coredumpsize unlimited) .
    Our tuxedo version is 9.1
    Regards,
    Peeyush
    Edited by: [email protected] on May 25, 2010 2:16 AM
    Edited by: [email protected] on May 25, 2010 2:17 AM

    Hi,
    I don't think there are any patches related to the problem you are having, and it still sounds like an environment problem. I would suggest contacting Oracle customer support and they can tell you what patches are available as well as they may have a solution for your problem.
    It is a little weird that you are having this problem on RHEL as I was using OEL which is based on RHEL. The major difference is I'm using Tuxedo 11gR1 on 32 bit machine.
    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect

  • Java.lang.UnsatisfiedLinkError: D:\...*dll: Can't find dependent libraries

    Hello,
    Every time I try run my application I get this:
    Exception in thread "main" java.lang.UnsatisfiedLinkError: D:\Java_przyklady\Met
    ody_macierzyste\HelloNative.dll: Can't find dependent libraries
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1485)
    at java.lang.Runtime.loadLibrary0(Runtime.java:788)
    at java.lang.System.loadLibrary(System.java:834)
    at HelloNative.<clinit>(HelloNative.java:12)
    at HelloNativeTest.main(HelloNativeTest.java:10)
    This application is example which was provided with book- Core Java 2
    Here is exactly what I have:
    HelloNative.java
    class HelloNative
       public static native void greeting();
       static
          System.loadLibrary("HelloNative");
    }HelloNativeTest.java
    class HelloNativeTest
       public static void main(String[] args)
           HelloNative.greeting();
    }Here is my HelloNative.c
    #include "HelloNative.h"
    #include <stdio.h>
    JNIEXPORT void JNICALL Java_HelloNative_greeting(JNIEnv* env,
       jclass cl)
       printf("Hello world!\n");
    }and HelloNative.h
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class HelloNative */
    #ifndef _Included_HelloNative
    #define _Included_HelloNative
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class:     HelloNative
    * Method:    greeting
    * Signature: ()V
    JNIEXPORT void JNICALL Java_HelloNative_greeting
      (JNIEnv *, jclass);
    #ifdef __cplusplus
    #endif
    #endifI did:
    javac HelloNative.java (I got HelloNative.class)
    javah HelloNative (I got HelloNative.h)
    gcc -c -D__int64="long long" -Ic:\j2sdk1.4.2\include\ -Ic:\j2sdk1.4.2\include\win32 HelloNative.c (I got HelloNative.o)
    dllwrap --add-stdcall-alias -o HelloNative.dll HelloNative.obut here I got:
    dllwrap: no export definition file provided
    Creating one, but that may not by what you wantand
    HelloNative.dll
    May by I made mistake used dllwrap, what this feedback means for me?
    So, when I did everything what I wrote abow I got:
    HelloNative.class
    HelloNative.h
    HelloNative.o
    HelloNative.dll
    and I run
    HelloNativeTest.class and I got above Error
    I use j2sdk1.4.2 and Windows XP
    Could anybody tell me what I did wrong???
    I will be appreciate

    The "Native Methods" forum is for JNI questions.
    See this thread...
    http://forum.java.sun.com/thread.jspa?forumID=52&threadID=534964

  • Calling extern functions in a c library

    Hi I am new to JNI and I am trying to use an existing c library that I have in a java application.
    I have written a c function which is called from java class, this works fine, the problem is when i try to call functions located in my c library from this function the code wont compile, giving a linker error. Specifically it wont compile the functions marked as being extern in the header file.
    I tried removing extern, but had the same error, I am not a c programmer.
    Any help would be really appreciated

    Hi,
    I doubt you will get a response since this thread is 7 years old. You are better off looking up the documentation for your compiler as this is not really a JNI question.
    With gcc you would use -L<lib_dir> -l<lib>
    Cheers,
    Shane

  • Camera Event Handler

    I handled camera event on changing of views from view list.
    I wrote following js code on 3D annotation----
    var collectViews = new CameraEventHandler();
    collectViews.onEvent = function(event)
    console.println("view changed");
      var camera = scene.cameras.getByIndex(0);
      camera.transform.rotateAboutXInPlace( -90 * Math.PI / 180);
      camera.targetPosition.set(scene.computeBoundingBox().center)
    runtime.addEventHandler(collectViews);
    But when i changed view from viewlist of 3D tool bar then camera event function get called 2 times......
    please solve this problem.............?
    Why it is calling two times on changing of view ?

    Unfortunately, we're not experienced enough with C.C++ and VC++ to know exactly how to fill in the gaps.Then I suggest you hire someone who is. This forum is for JNI questions. It is not a C/C++ programming service. Locking this thread.

  • Problem related to C program

    I have a char pointer and we have to define its size as 10 and a String inserted in it ("SANJAY");
    How i can solve this problem in C using dynamic memory allocation

    I have a char pointer and we have to define its size as 10 and a String inserted in it ("SANJAY");Is that a JNI question? Can you be more accurate about your requirements?
    How i can solve this problem in C using dynamic memory allocationIs that a homework question? Can you be more open about whether this is the case, and what yourself already analyzed and suggest (we'll gladly comment on your attempt to help you improve it if needed).

Maybe you are looking for

  • A3 Can't import GPX Data from MacGPS Pro

    I'm on a trip trying out A3 for the first time. I have a Garmin 76CSx and normally import my track logs into MacGPS Pro 8.6.0 I same the track logs as GPX files and then import them into A3. Early in the trip, I could see the track in the Map in A3,

  • Add new field

    Hi all, I need to add a new field for sales order in additional data a tab.  I have two user exits MV45Aozz and mv45AIzz ( user modules fo rPBO and PAI). Need to update 3 standard table. VBAK, LIKP, BBRK. Plz help me in this regard, 1. Do i need to c

  • Regarding   Scale Type

    Hi , i am working on Pricing  condition types. i have doubt in scale types. In scale type drop down  Option " D " is there Graduated-to interval Scale . can anybody explain what is the use of this scale type and in what kind situations i can use this

  • Error saying problem signing into itunes server when renting movies

    I have tried to rent several different movies the last two days from my ATV2 and I keep getting an unable to log in message. I can watch netflix, movies through homesharing, and I even get the previews of movies but when I click the rent button it lo

  • How to connect X-Fi to surround system with tulip audio

    I have Sound Blaster X-Fi and 5. surround stereo system with surround tulip in (this system separates audio channels itself). SB X-Fi have 3 mini-jack outs so it also separates audio channels. How I can connect my X-Fi to this system with one mini-ja