Problem with JNI for target armlinux

Dear friends,
We have compiled CVM for ARM Linux and it is working fine for java programs as well as C programs.
But when I try to make shared library out of a sample hello world JNI program for arm linux it says 'jni.h: No such file or directory' and after that many lines 'syntax error' and 'parse error' etc.
But the same program is running fine on x86 linux. Problem only while cross compiling for arm linux. It is not problem with arm-v5t-le-gcc because that is working fine. Problem is with what I need to include in makefiles.
As I am new to this domain could anyone help me where I am missing?
Regards
Kishore

I'm not exactly sure what you're talking about, but it sounds like you may need to look into global references. Look at NewGlobalRef() and DeleteGlobalRef() and see if those help you out.
God bless,
-Toby Reyelts
For all your JNI woes, check out Jace - http://jace.reyelts.com/jace

Similar Messages

  • Awkward problems with JNI on J2SE 5.0

    I'm experiencing a strange problem with JNI and I hope someone can help me out.I've installed Cygwin, MinGW and then the CDT plug-in for Eclipse C/C++ development. This means I've used the MinGW make utility. It successfully creates the DLL file, but for some awkward reason, function www_tutorial_jni_HelloWorld_displayHelloWorld cannot be found (UnsatisfiedLinkError: displayHelloWorld).
    The Java class looks like this:
    package www.tutorial.jni;
    public class HelloWorld {
        public native void displayHelloWorld();
        static {
            System.loadLibrary("hello");
        public static final void main(String[] args) {
             try {
                  HelloWorld hw = new HelloWorld();
                  hw.displayHelloWorld();
             } catch (Exception e) {
                  System.out.println(e.toString());
    }The header that was generated by javah.exe (version 1.5.0_01) looks like this:
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class www_tutorial_jni_HelloWorld */
    #ifndef _Included_www_tutorial_jni_HelloWorld
    #define _Included_www_tutorial_jni_HelloWorld
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class:     www_tutorial_jni_HelloWorld
    * Method:    displayHelloWorld
    * Signature: ()V
    JNIEXPORT void JNICALL
    Java_www_tutorial_jni_HelloWorld_displayHelloWorld
      (JNIEnv *, jobject);
    #ifdef __cplusplus
    #endif
    #endifThe C++ implementation looks like this:
    #include <jni.h>
    #include "www_tutorial_jni_HelloWorld.h"
    #include <stdio.h>
    JNIEXPORT void JNICALL
    Java_www_tutorial_jni_HelloWorld_displayHelloWorld(JNIEnv
    *env, jobject obj)
        printf("Hello world!\n");
        return;
    }I've made sure that the fully qualified name of the implementation function is identical to the one in the header. I don't understand why I still get the error; especially since checking the DLL reveals that a function called "Java_www_tutorial_jni_HelloWorld_displayHelloWorld" exists.
    Could someone try and produce a successfull DLL/SO from the C++ code and then try and run the Java part on a 5.0 version of Java? I'm really curious as to what on Earth is going on...

    ... Otherwise, I would have
    to add whatever directory I put my DLL into to the
    PATH variable.Not necessarily. I believe the "PATH" also implicitly includes the "current directory". I also think that most JNI users put their DLL in a directory from which they also launch java (so it's in the current directory).
    >
    ... a java.library.path set.
    If I don't explicitly set a Java library path,
    Eclipse can't even find the DLL. I'm beginning to
    believe that Eclipse somehow screws up running Java
    programs with native code...I don't know about that... Probably just something extra you have to do with your Eclipse project so that it can find the DLL.
    But like I said, I don't really know - just trying to throw out ideas, small as they may be.

  • Problem with mail for exchange after update on E72...

    Hi everyone,
      I updated Nokia E-mail to ver 3.9 on E72. Now I am facing  a problem with mail for exchange. I have configured gmail on mail for exchange. I recieve a warning that "unable to sync contact administrator if problem persist". It started to pop up just after the update was over and is very frustrating. Even previously i used to recieve mails instantly but now it generally takes half an hour for me to recieve them. I deleted and created mail for exchange several times but to no avail.
    Also i am not able to automatically recieve mails other emails which i have configured. every time I have to manually download them everytime.
    Can anybody suggest a way out.
    Thanks
    Anil

    It could be a problem if you're using your network's connections...
    I was on a Pay & Go tariff with o2 some time ago, and needed secure connections for various things, o2 told me they didn't provide secure connections on Pay & Go tariffs...
    Could be worth checking with them to make sure it's supported.
    Nokia History: 3110, 5110, 7110, 7110, 3510i, 6210, 6310i, 5210, 6100, 6610, 7250, 7250i, 6650, 6230, 6230i, 6260, N70, N70, 5300, N95, N95, E71, E72
    Android History: HTC Desire, SE Xperia Arc, HTC Sensation, Sensation XE, One X+, Google Nexus 5

  • Problem with facetime for mac

    hello guy! I've got a problem with facetime for mac.My sister has a I-pod touch fourth generation with factime but i cna't phone her a message come on my mac.It say "xxx can't receive facetime's calls"!Can you help me??

    Thanks, Dah•veed.
    I did see mention of using Google Public DNS while I was searching the forums prior to posting, but to be honest didn't think it was a DNS-related problem.
    However, to rule it out I've set the prefered DNS servers on my router to Google's, but FaceTime still disconnects after 4-5 seconds when calling between me and my brother-in-law.  It doesn't matter who initiates the call.
    As a test, before I made the changes to my router, I logged into FaceTime as him on my MBP and tried calling myself on my iMac, and that was successful.
    The same test between the two iMacs when they were here was unsuccessful, so now I'm definitely thinking it's something on the '08 iMac.
    Now I just need to figure out what...

  • Problem with Twitter for Mac notifications

    Hello,
    I have a strange problem with Twitter for Mac. On both my home and office Macs. New posts appear in app window but there aren't any notifications even though notifications are set in preferences to show in both dock and menubar. Perhaps anyone noticed similar strange behaviour? I didn't find anything similar on Twitter forums.
    Thanks in advance.

    Solved by
    Dr.AvituvOct 20, 2014 11:09 PM
    go to Terminal and post this:
    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchSe rvices.framework/support/lsregister -kill -seed
    if it doesn't have that specific directory try this:
    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchSe rvices.framework/Versions/A/Support/lsregister -kill -seed
    once the scanning is done (can be short or long, depends on how heavy your system is) RESTART the computer.
    when you're back, go to Apple>system preferences>extensions.... guess who's there.
    I hope it helped.
    The Doctor.
    iMac, OS X Yosemite (10.10)
    To restore Actions extensions for good and other stuff
    THANKS!

  • Problem with GarageBand for iOS 6/7 Iphone 3gs / 4

    Problem with GarageBand for iOS 6/7 Iphone 3gs / 4
    Hello,
    On February 16, bought the GarageBand for iOS which was free and so I find and install it on my 3GS .
    Take the demo: Curtain Call Demo
    and within the instruments :
    audio Recorder
    Sampler
    Smart Drums
    Smart Strings
    Smart Bass
    Smart Keyboard
    Smart Guitar
    Keyboard
    Drums
    Guitar Amp
    1.4.1 is the latest version for ios 6.
    Configure my AppleID on a Iphone 4 and install the program , the version I have the Iphone 4 is the orange ( different from 3gs ) icon and put it on the AppStore : ios 2.0.1 for ios7.
    With these instruments :
    audio Recorder
    Sampler ( to download the instrument )
    Smart Drums ( to download the instrument )
    Smart Strings (Download the instrument )
    Smart Bass ( to download the instrument )
    Smart Keyboard ( to download the instrument )
    Smart Guitar
    Keyboard
    Drums
    Guitar Amp ( to download the instrument )
    and if I give what I need to restore tells me if I bought it I did not restore anything and tells me to buy :
    Complete collection of GarageBand instruments and sound at a price of : € 4.49
    As they are 2 different versions ? More than anything I say because I have to pay for the instruments in the 2.0.1 version of the Iphone 4 ... ?
    And besides not wearing demo Demo Curtain Call : (
    GarageBand 1.x If you are upgrading it using iTunes on a Mac or PC, you can restore the original collection of instruments and sounds. There is no need to buy this collection. Press "You've already purchased?" When displayed on iPhone, iPad or iPod touch.
    this puts on the AppStore but I have tried to restore as I wrote above, and does not work. There is nothing to restore.
    regards

    I've been having the same problem. However, I believe my problem is due to the 3G issues I've been having. I don't have internet access even when the 3G symbol appears, so probably my iphone keeps trying to connect to the network and has its battery drained! Have you been having the same issue?

  • I have problem with fonts for my site, i have used "Lucida sans unicode " family for certain texts. it shows perfect in mozilla 3.5 and mozilla 4. But the font not supporting in mozilla 5.0? please help me

    i have problem with fonts for my site, i have used "Lucida sans unicode " family for certain texts. it shows perfect in mozilla 3.5 and mozilla 4. But the font not supporting in mozilla 5.0? please help me

    i have problem with fonts for my site, i have used "Lucida sans unicode " family for certain texts. it shows perfect in mozilla 3.5 and mozilla 4. But the font not supporting in mozilla 5.0? please help me

  • Stacked 100% bar chart - Problem with datatips for zero value data points

    I have a stacked 100% bar chart that shows datatips in Flex 4.   However, I don't want it to show datatips for
    data points with zero values.   Flex 4 shows the datatip for a zero value data point on the left side of a bar if the data point is not the first in the series.
    Here's the code that illustrates this problem.    Of particular concern is the July bar.    Because of the zero value data point problem, it's not possible to see the datatip for "aaa".
    Any ideas on how we can hide/remove the datatips for zero value data points ?        Thanks.
    <?xml version="1.0"?>
    <s:Application
    xmlns:fx="
    http://ns.adobe.com/mxml/2009"xmlns:mx="
    library://ns.adobe.com/flex/mx"xmlns:s="
    library://ns.adobe.com/flex/spark"creationComplete="initApp()"
    height="
    1050" width="600">
    <s:layout>
    <s:VerticalLayout/>
    </s:layout>
    <fx:Script><![CDATA[ 
    import mx.collections.ArrayCollection;[
    Bindable] 
    private var yearlyData:ArrayCollection = new ArrayCollection([{month:
    "Aug", a:1, b:10, c:1, d:10, e:0},{month:
    "July", a:1, b:10, c:10, d:10, e:0},{month:
    "June", a:10, b:10, c:10, d:10, e:0},{month:
    "May", a:10, b:10, c:10, d:0, e:10},{month:
    "April", a:10, b:10, c:0, d:10, e:10},{month:
    "March", a:10, b:0, c:10, d:10, e:10},{month:
    "February", a:0, b:10, c:10, d:10, e:10},{month:
    "January", a:10, b:10, c:10, d:10, e:10}]);
    private function initApp():void {}
    ]]>
    </fx:Script>
    <s:Panel title="Stacked Bar Chart - Problems with DataTips for Zero Value Items" id="panel1">
    <s:layout>
    <s:HorizontalLayout/>
    </s:layout>
    <mx:BarChart id="myChart" type="stacked"dataProvider="
    {yearlyData}" showDataTips="true">
    <mx:verticalAxis>
     <mx:CategoryAxis categoryField="month"/>
     </mx:verticalAxis>
     <mx:series>
     <mx:BarSeries
    xField="a"displayName="
    aaa"/>
     <mx:BarSeries
    xField="b"displayName="
    bbb"/>
     <mx:BarSeries
    xField="c"displayName="
    ccc"/>
     <mx:BarSeries
    xField="d"displayName="
    ddd"/>
     <mx:BarSeries
    xField="e"displayName="
    eee"/>
     </mx:series>
     </mx:BarChart>
     <mx:Legend dataProvider="{myChart}"/>
     </s:Panel>
     <s:RichText width="700">
     <s:br></s:br>
     <s:p fontWeight="bold">The problem:</s:p>
     <s:p>Datatips for zero value data points appear on left side of bar (if data point is not the first point in series).</s:p>
     <s:br></s:br>
     <s:p fontWeight="bold">For example:</s:p>
     <s:p>1) For "June", eee = 0, mouse over the left side of the bar to see a datatip for "eee". Not good.</s:p>
     <s:br></s:br>
     <s:p>2) For "July", eee = 0 and aaa = 1, can't see the datatip for "aaa", instead "eee" shows. Real bad.</s:p>
     <s:br></s:br>
     <s:p>3) For "Feb", aaa = 0, datatip for "aaa" (first point) does not show. This is good.</s:p>
     <s:br></s:br>
     <s:p>4) For "Mar", bbb = 0, datatip for "bbb" shows on the left side of the bar. Not good.</s:p>
     <s:br></s:br>
     <s:p fontWeight="bold">Challenge:</s:p>
     <s:p>How can we hide/remove datatips for zero value data points?</s:p>
     <s:br></s:br>
     </s:RichText></s:Application>

    FYI.
    Still have the issue after upgrading to the latest Flex Builder 4.0.1 with SDK 4.1.0 build 16076.   
    Posted this as a bug in the Adobe Flex Bug and Issue Management system.     JIRA
    http://bugs.adobe.com/jira/browse/FLEXDMV-2478
    Which is a clone of a similar issue with Flex 3 ...
    http://bugs.adobe.com/jira/browse/FLEXDMV-1984

  • I have problems with office for mac  screen resolution, specially with excel

    I have problems with office for mac  screen resolution, specially with excel ?

    For starters, make sure to Check for Updates on any of the Help menus, and make sure the product has all the latest patches. MS did come out with a patch addressing the display issues on Retina Macs. Latest patchlevel is 14.3.2.
    We are talking about Office:Mac 2011, right?

  • Please Help?! Problems with Viber for iPhone 4s

    Please help!
    I have had problems with Viber for a while now and had given up! But now a few contacts only have viber and not other free messaging apps so I’m trying to use it again but still having problems.
    I have uninstalled and reinstalled a number of times and still have not received an access code. My main problem though is the messaging it would work fine and then I wouldn’t be able to send any messages and I would receive a message go into the app and the message would not appear.
    The other day I reinstalled it whilst at work and worked perfectly could send and receive messages easily. Then when I went home the problem stated again. I then uninstalled and reinstalled again and it worked perfectly, but now back at work I’m having the issues again! I can’t keep uninstalling and reinstalling is there a way this can be fixed?!
    If anyone is able to help me out it would be much appreciated! Thanks

    You activated "Find My Mac," which disables the built-in Guest account and adds a Safari-only "Guest User" pseudo-account. To get the Guest account back, you would have to disable FMM.

  • We have been having a problem with newsletters for a client. The newsletter works fine except if we add a button and/or link to the top zone on that newsletter it blows up ONLY ON iPhones!

    We have been having a problem with newsletters for a client.
    The newsletter works fine except if we add a button and/or link to the top zone on that newsletter it blows up ONLY ON iPhones!
    This happened last month too. It seems to be related to length of the newsletter too. It works on every device except iPhones - so weird.

    Hi, is anyone else experiencing i-phone only problems on email campaigns? not bashing Apple, just having issues where our newsletter are only having issues on iPhones

  • Problem with RpClean for Rep Development 3.0.L.0

    Hello Forte Users :
    We are running Forte 3.0.L.0 we previously upgraded from 3.0.J.1, 20
    developer workspaces and a repository for both development and
    deployment.
    We are facing problems when we run an Rpclean for this Development
    Repository, this process aborts with a fatal error message, the log
    screen for this process issues the following messages
    the deletion objects is made,
    the repository compress is made,
    the rebuild of the index is made,
    but then when the process is creating back the repository it displays
    "fatal error" and issues a message that it cannot truncate the .btx
    file.
    the command executed is :
    rpclean -n Desarrollo -fr :/var/forte/repodesa -t /var/jaeb
    Any experience on this regard?. If any, would be highly appreciated.
    Jorge
    Do You Yahoo!?
    Get your free @yahoo.com address at http://mail.yahoo.com
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Jorge,
    How big is your repsitory. Because if you are running on Digital Unix
    you will have problems, when the repository is bigger then 1 gigabyte!
    During the rpclean process a 'copy' is build and the unix system cannot
    handle more than 2 gigabyte. I expect the maximum size of the repository
    will be different for each operating system, but this might be your
    problem!
    Hans van Drunen
    Origin DeskTop Business Solutions Rotterdam
    Admiraliteitskade 60, 3063 DC Rotterdam
    Telefoon : +31 10 - 242 81 00
    Fax : +31 10 - 242 81 81
    -----Original Message-----
    From: Jorge Espinoza [mailto:[email protected]]
    Sent: Wednesday, June 16, 1999 18:17
    To: [email protected]
    Subject: Problem with RpClean for Rep Development 3.0.L.0
    Hello Forte Users :
    We are running Forte 3.0.L.0 we previously upgraded from 3.0.J.1, 20
    developer workspaces and a repository for both development and
    deployment.
    We are facing problems when we run an Rpclean for this Development
    Repository, this process aborts with a fatal error message, the log
    screen for this process issues the following messages
    the deletion objects is made,
    the repository compress is made,
    the rebuild of the index is made,
    but then when the process is creating back the repository it displays
    "fatal error" and issues a message that it cannot truncate the .btx
    file.
    the command executed is :
    rpclean -n Desarrollo -fr :/var/forte/repodesa -t /var/jaeb
    Any experience on this regard?. If any, would be highly appreciated.
    Jorge
    Do You Yahoo!?
    Get your free @yahoo.com address at http://mail.yahoo.com
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Problem with JNI and Parallel Port dll

    Hi. I'm doing some testes with JNI. Firs i followed the netbeans tutorial for doing a C programa that prints somthing for java.. like.. "Hello java from C".
    So i tried to load a dll from my dll. Like, I have this dll to use the parallel port on windows Xp. So i created a dll to access it an comunicates eoth java.
    I did everything just fine.
    When I start my Java app, the first thing it does is to load this parallel port dll and configure the functions of it.
    After that .. I get this error
    EXCEPTION_FLT_STACK_CHECK (0xc0000092) at pc=0x0093d269, pid=2284, tid=3000
    Can someone explain why ?
    (Sorry if i wasn't clear enough, english is not my native language, so ask if you don't understand something.. )

    hi ,
    I met the same problem this morning, and searched the www.google.com in order to solve it, as a result, your article was shown on my screen. :)
    Till now I have read some technical information and solved my problems. Maybe the solution be useful to you:
    ==============================
    error message : (Environment : Tomcat 5, Windows 2003, Mysql5)
    2006-3-29 11:53:48 org.apache.catalina.core.StandardWrapper unload
    message: Waiting for 2 instance(s) to be deallocated
    ==============================
    cause: the number of connection to database exceeded.another word,too many connections.
    ==============================
    solution: close the connection when it becomes useless for your program. :)
    ==============================
    ps. Sorry for my weak English . hehe ....

  • Problem with JNI hello world

    I found some tutorial on SUN site on how to use JNI. I'm using Eclipse to compije Java and C (via Cygwin) files. Here are complete files:
    Hello.java:
    class Hello
         public native void sayHello();
         static
              try
              System.loadLibrary("hello");
              catch(Exception e)
                   System.out.println("exc");
         public static void main(String[] args)
              Hello h = new Hello();
              h.sayHello ();
    }Hello.c:
    #include <mingw/_mingw.h> //because there are some types needed for JNI
    #include <jni.h>
    #include "Hello.h"
    #include <stdio.h>
    JNIEXPORT void JNICALL Java_Hello_sayHello
      (JNIEnv *env, jobject obj)
         printf("Hello world!\n");
         return;
    }Makefile:
    hello.dll : Hello.o Hello.def
         gcc -g -shared -Wl,--kill-at -o hello.dll Hello.o hello.def
    Hello.o : Hello.c Hello.h
         gcc -c -g -I"$(JAVA_HOME)\include" -I"$(JAVA_HOME)\include\win32" Hello.c -o Hello.o
    Hello.h : Hello.class
         javah -jni Hello
    clean :
         rm Hello.h
         rm Hello.o
         rm hello.dllHello.def
    EXPORTS
    Java_Hello_sayHelloEverything goes well, but when I run java program it does nothin (it should print message, but it just exit without any error).I'm sure that it's something stupid, but I cant see what. Can anyone tell me what am I doing wrong?
    Thenks.

    Answer 1: yes, there was no problem. I compiled and started simple 'hello world' program from Cygwin and from WinXP console, and it worked well.
    Answer 2: This is weird, I changed code to this:
    Hello.java:
         public native int getInt();
              System.out.println("Returned int is " + h.getInt());Hello.c:
    JNIEXPORT jint JNICALL Java_Hello_getInt
      (JNIEnv *env, jobject obj)
         return 25;
    }It does not print anything. I started this program from Cygwin and from WinXP console, and from Eclipse. Only if I debug in Eclipse (step by step) I get:
    Returned int is 25and still I don't get Hello string printed (even if I go step by step). It looks like cygwin has some problem with OS. Do you have any idea what to do, I'm a bit confused?
    Thank you.
    Message was edited by:
    zly

  • Problem with JNI

    i have to implement a few standard APIs. As a part of the implementation I have to provide references to an object I create. Now my underlying code is C++ with JNI used to throw the Java APIs. Problem is JNI now returns different references for the same object and hence my prupose id defeated. Could anyone suggest how this problem can be overcome.

    I tried to figure out what your problem is, but can't. Please rephrase it and give a bit more detail on what you are doing and what is going wrong.

Maybe you are looking for

  • Open close PO's

    Hi All, I want help in changing my code for getting open & close PO’s. I wrote the code in Start-of-Selection. This code is working fine with my PO’s whether close or open basing on the status of delivery or on the quantity delivered and invoiced. My

  • Oracle database XE 10g on Windows XP Professional SP2

    I'm installing Oracle Database XE 10g on my computer but when i launch the exe I receive the message ' error reading set up inizialization file '. help me please

  • Problem with ESB routing service

    I have an ESB project that has a routing service to route a request message to 2 separate web services depending on some particular content in the message. simple classic content-based routing. i built a prototype on my local virtual machine, it work

  • Notification Mail language

    Hi, I have to send a notification (mail step) with the communication language of the receiver. The problem is that we only have 3 or 4 languages translated.... For doind this I'm binding the "Language" variable to the contaner of the mail step. My qu

  • The dreaded Error #1009

    I'm not sure why this is happening: "TypeError: Error #1009: Cannot access a property or method of a null object reference. at BRPuzzle_fla::MainTimeline/frame15()" All there is on Frame 15 is a movie clip "mcOne." The AS on that frame is attached. W