Java calling C/C++ and back (asynchronously)

Hi everybody!, i have the following issue.
I have an API in a dll wich allows you to register functions (in C) which will be called when some event occurs.
I have to register a Java function so i hava a native method from wich i can access this dll and register another C function into the API, which will call the desired Java method.
The problem is that i can get back to Java from within the native method, but i can't get to access from the C callback function which is called by the API asynchronously. What i'm doing is trying to instanciate another JVM from the C callback function, but i can't.
Is this the right way to go? Should i try something different?
Thanks!

Hi, thanks for your very quick reply !
I could not give JNative a try yet.
You see, i have already been given a dll wich i can't
change and it allows me to register a function in C
(just one of the things you can do with it) as a
callback function. This has to call Java.
Can I use this thing you've done with this other
dll ? I am creating a how to on http://jnative.free.fr, it is not finished yet and takes me more time than I have so be patient ;)
The sources released with JNative contains a sample with Win32's EnimWindows(), if your dll works like this it should work.
--Marc (http://jnative.sf.net)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • JAVA Calling Oracle Function and Returning OBJECT

    HI,
    I am working as a developer in java/j2ee project.
    I am facing one issue:
    I need to call Oracle function from java code. Oracle User define function is residing in oracle package and returning Object which contains data.
    Can you please help me
    With Best Regards

    golduniya wrote:
    I need to call Oracle function from java code. Oracle User define function is residing in oracle package and returning Object which contains data.
    Can you please help meIt requires a great deal of Oracle jdbc driver specific code.
    [http://download-west.oracle.com/docs/cd/B10501_01/java.920/a96654/oraint.htm#1012664]

  • I tried to sync my iPod touch to a new laptop and it deleted all of my music and videos. I called tech support and they told me to email iTunes and they would give it back to me. How do I do this??

    I  tried to sync my iPod touch to a new MacPro laptop and it deleted all of my music and videos. I called tech support and they told me to email iTunes and they would give it back to me. How do I do this??

    Correct. When you update via iTunes all synced media that is not in your iTunes library will be lost.
    As IO said before:
    You can redownload most iTunes pruchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    I do not think it included audio books.

  • HT1725 For about three weeks I haven't been able to download any apps, not even the free ones.   My apple id billing information says that my security code on the back of my credit card is invalid. I called apple support and they told me to go to the expr

    For about three weeks I haven't been able to download any apps, not even the free ones.   My apple id billing information says that my security code on the back of my credit card is invalid. I called apple support and they told me to go to the express lane website but I still cant find a fix for my problem. If you could help me out that would be superb!!!!

    Is the address on your iTunes account exactly the same (format and spacing etc) as on your credit card bill : http://support.apple.com/kb/TS1646 ? If it is then you could try what it says at the bottom of that page :
    If the issue persists, contact your credit card company and verify that they and any company they use to process credit card authorisations have the correct information on file.
    And/or try contacting iTunes support : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page

  • HT3702 Today I bought app call starsports app and now I can open app and email to starsports they say not for Canada I ask my refund but they ask me to go with iTunes support team...please can you refund my money back in my account

    Today I bought app call starsports app and now I can open app and email to starsports they say not for Canada I ask my refund but they ask me to go with iTunes support team...please can you refund my money back in my account

    We are fellow users here on these user-to-user forums, you're not talking to iTunes Support nor Apple.
    Purchases are considered final, but you can try the 'report a problem' link to contact iTunes Support and see if they will refund or credit you : http://reportaproblem.apple.com
    If the 'report a problem' link doesn't work then you can try contacting iTunes Support via this page : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • Today I bought app call starsports app and now I can open app and email to starsports they say not for Canada I ask my refund but they ask me to go with iTunes support team...please can you refund my money back in my account

    Today I bought app call starsports app and now I can open app and email to starsports they say not for Canada I ask my refund but they ask me to go with iTunes support team...please can you refund my money back in my account..

    Welcome to the user to User Technical Support Forum provided by Apple.
    For your issue.. Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader. For which, We created and execute the below command line to call Adobe Reader and print the PDF on a

    We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader. For which, We created and execute the below command line to call Adobe Reader and print the PDF on a printer."C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" /T "\\<Application Server>\Report\<TEST.PDF>" "<Printer Name>". Current Situation: The above command line parameter when executed is working as expected in a User's Workspace. When executed in a command line on the Application Server is working as expected. But, the same is not working while executing it from Deployed environment.Software being used: 1. Adobe 11.0 enterprise version. 2. Webshpere Application Server 8.5.5.2. Please let us know if there is a way to enable trace logs in Adobe Reader to further diagnose this issue.

    This is the Acrobat.com forum.  Your question will have a much better chance being addressed in the Acrobat SDK forum.

  • Java call rfc check in original:error while checking in and storing.

    hi,experts.
    java call rfc check in original:error while checking in and storing. BAPI in the RFC is "BAPI_DOCUMENT_CJANGE2",
    the RFC was fine in SE37 and calling by Visual Basic. and in java,when mConnection.setAbapDebug(true), and  runing by step and step, was fine too.
    if mConnection.setAbapDebug(false) in JAVA, up error in title was displayed.
    what cause this error?
    Best Regards.

    Hi Priya
    Please use Su53 after getting the error and find any authorization is missing for the user..
    S_GUI Full Authorization is required..
    Since by giving BASIS Authorization its rectificed, then it shud be mostly due to Auth issues only
    Regards
    Aby

  • IPhone 5c IOS7.0.3, other people can no longer hear me during calls unless I tap into speaker mode and back?

    Hi,
    I'm currently using an iPhone 4S, but my partner has just bought an iPhone 5c. A while ago, before the IOS7 upgrade, my phone would for some reason act as if I had clicked mute during calls. Nobody would hear me, but I could hear them perfectly. The only fixes were to hang up and recall them back, or to switch it to speaker mode and back again. Very annoying. However, after updating my IOS, it suddenly stopped doing this. It was fixed, I was happy, game on.
    But recently, my partners phone which was working perfectly fine before the new IOS7.0.3 update, has developed this problem. Exact same issue, exact same solution. I wouldn't mind so much, but shes bought this phone in the last month, its a brand new phone, new software, new model... It shouldn't still be doing this! Whats worse is that when driving, its very dangerous for her to have to keep switching between speaker and not just to get her phone working. (She drivers with the phone in a cradle with hands free on).
    This issue is... Annoying. I've found that its not exactly a rare thing, and that a lot of people have had it for quite a while, but the only solution I've seen is to open the back of your phone and cover a certain part with paper/cardboard... Not exactly what we want to do is it.
    Does anybody have any advice or a solution to this, as I'm going a little crazy trying to reset everything and fix it!
    Thanks in advance!

    Same issues here. Sometimes during outgoing calls, people cannot hear me at all, even when the signal strength is good. Only solution is to soft reset the phone. A couple of times the person could hear me for the first few seconds of the call then it dropped completely.
    I also experience the issue with the 3G data as you described (I think they are related... i.e., when the 3G data isn't working, the issues with outgoing calls exists too). The phone will just randomly seem to lose it's internet connection, even with full signal strength. Soft reset/toggling airplane mode fixes this.
    I called Apple support; they asked if I was covering the microphone during outgoing calls (as if I'm that stupid). Come on Apple, I have a University degree in Computer Engineering, don't insult my intelligence! They then asked me to restore the phone (which I already did). Next solution they offered me was to replace the phone by sending me a new one first (at a cost of $35), or I could send it back and be phoneless for a week while they send a new one (which is not an option for me). I also put on a $30 Invisibile Sheild so if I exchange it, I already lose that. I believe the issue is not with the hardware, since the microphone seems to work just fine. Given that it is intermittent like this, it seems there's a software/firmware error somewhere that gets the phone into a bad state.
    Very disappointed that the $800 phone I just bought functions worse for phone calls than the Nokia brick I had 8 years ago.
    If anyone has a permanent solution for this that doesn't involve exchanging the phone, please let me know.

  • I went to make a call this morning, and all my contacts have disappeared! How can I can them back? I only just entered them all the other day, this is my first iphone

    I went to make a call this morning and all my contacts have disappeareed, how do i get them back? This is my first iphone (4s) and i only just entered them all manually 4 days ago! Please help me!

    I entered them directly into my phone. Two days ago, I plugged it into my mac and synced it with itunes, but i didn't sync the contacts and they were still in there after.

  • I upgraded to a 4g and the most recent backup (today) is not showing up.  I went ahead and backed up and found that my texts, phone calls and messages did not backup.

    I upgraded to a 4g and the most recent backup (today) is not showing up.  The most recent backup that showed was 3/3/12.  I went ahead and backed up to that date and found that my texts, phone calls and messages are the part that did not backup. 
    Can anyone tell me 1) why my most recent backup did not show in ITunes, 2) why I could not backup using the Cloud (I tried this way first), 3) how I can get all the phone calls, messages and texts from 3/3/12 until today?  Please help if you can...thanks!

    I found the answer on:
    transferring Txt messages from old phone to new iphone 4
    It worked great!

  • So I had pictures in an album called photo library and when i backed up my iphone to my computer, the pictures disappeared from my phone. They were pictures that had originally been transferred from my blackberry to my iphone

    I had pictures that I transferred from my blackberry to my iphone and they were in an album labeled photo library. my phone needed to be replaced so I backed it up to my computer and now my photos are gone. The camera roll pictures are still there but my 800 photos from my blackberry are gone. does anyone know where i can recover them from? are they gone forever? any help would be much appreciated. thank you

    I transferred my photos (I cant recall how i did) from my old blackberry to my new iphone.
    Okay.
    i also imported the photos to iphoto but it was only the pictures from the last six months (camera roll).
    Okay.
    I dunno if this information is useful but the photos im trying to recover were in an album called photo library and they were permanent and couldnt be edited or deleted on the iphone.
    These photos were never on your Mac. iPhoto only imports from the Camera Roll. You'd have needed to use a 3rd party app to get any other photos from your phone.
    Regards
    TD

  • Calling Oracle Export and Import in java

    Hi,
    I am trying to call oracle export and import utilites in my java application,
    can anyone help me that how can i do this, plz consider the case as this is a part of my project..
    Regards
    Ashish

    You should just be able to call the "imp" and "exp" executables ($ORACLE_HOME/bin) using the Runtime class. You can setup the various parameters for export / import in a parameter file.
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    http://www.orafaq.com/faqiexp.htm

  • Calling oracle export and import utilities in java

    Hi,
    can someone help me, i have to call oracle export and import utilities through my java application, can anyone guide me, how i can do it..
    Thansks
    Ashish

    Hi,
    can someone help me, i have to call oracle export and
    import utilities through my java application, can
    anyone guide me, how i can do it..You mean the command line ones? Use Runtime.exec();

  • Calling Oracle Functions and Procedures in Java

    I've looked online for a blurb on using Oracle SQL functions and
    procedures in Java, but I haven't found anything. Can someone
    either give me a quick crash course on this, or point me to the
    best source of information for this?

    From the SQLJ FAQ.
    http://otn.oracle.com/tech/java/sqlj_jdbc/htdocs/faq.html#sqljplsql
    Within your SQLJ statements, you can use PL/SQL anonymous blocks
    and call PL/SQL stored procedures and stored functions, as in the
    following examples: Anonymous
    block:
    #sql {
    DECLARE
    n NUMBER;
    BEGIN
    n := 1;
    WHILE n <= 100 LOOP
    INSERT INTO emp (empno) VALUES(2000 +
    n);
    n := n + 1;
    END LOOP;
    END
    Stored procedure call (returns the maximum
    deadline as an output parameter into an output host expression):
    #sql { CALL MAX_DEADLINE(:out maxDeadline) };
    Stored function call (returns the maximum
    deadline as a function return into a result expression):
    #sql maxDeadline = { VALUES(GET_MAX_DEADLINE)
    Of course, you can also use JDBC code to achieve the same - the
    standard JDBC escape sequences for stored function and procedure
    calls are supported, using for example:
    "{? = CALL GET_MAX_DEADLINE}"
    or:
    "{call MAX_DEADLINE(?)}"
    and for the rest of the details, get that JDBC crash course...

Maybe you are looking for