JNI Problem - JAVA invoke C++ and the way back from C++ to JAVA
Hi @ all!
I am a computer science student and I have a problem with the JNI Interface.
First the program structure:
We have a Java GUI a wrapper and a C++ protocol. That is the general communication way:
left side:
JAVA GUI
|
Wrapper (JAVA)
|
C++ protocol
|
|
Network transfer
|
|
C++ protocol
|
Wrapper (JAVA)
|
JAVA Gui
The program sequence is following:
- The GUI will be started and call a protocol init method in the native code. The JAVA and C++ instance are already running!!
- The protocol handles some information.
- Then the left side e.g. invoke a method. The protocol transmits the packet to the other side. But HERE is the problem. On the other side the protocol must call a static JAVA Method from the running JAVA instance.
I have no idea how I can handle this problem. I tried to save the env pointer und the jobject at the first invocation from Java to C++. With this elements I tried to getObjectClass(saved jobject) and tried to invoke the static JAVA method but I got a SIGSEGV from the JVM.
How can I solve this problem??
By the way, I generate through the java wrapper my C++ header and the the Java wrapper load a shared object!
I work with a Gentoo System and with Java 1.5.
I hope anybody can help me!
Cheers,
Edited by: polo6n2 on Jul 3, 2008 1:04 AM
You mean the communication is aschronous?
Then the C++ side will have a C++ thread. That thread calls a method. That method FIRST uses the JNI method to attache the thread.
Then you look up whatever you need in java, maybe a class and you call JNI methods to interact with it.
If you don't attach the thread it will not work.
JAVA method but I got a SIGSEGVThen you did something wrong in your C++ code.
Similar Messages
-
The way back???
I don't know if the following is possible.
We use JNI to send commands to a dll, but can we send commands the way back, from the dll to the java application?
Maybe through posting messages in the dll on the java frame?
Via a binary tcp/ip stream it will work, I guess, but that's a bit too unstable for long sessions.Sorry, but I didn't read the chapter about callbacks yet. :-))))
So ignore this thread please... -
Since you don’t allow emails any more – I suspect because of the numerous complaints with your service and the way you treat people that you don’t want documented, I am calling and I want this call recorded for future reference.
I have been a long time faithful customer of vzw and although the past year I have been late on payments many times and really couldn’t afford your exorbitant prices for services lots of other companies offer sometimes three times cheaper than what you charge, I have hung in there trying my best to meet my obligations.
This month has been no exception. You don’t know the background; the whole story of people’s lives. I know you could care less because all you care about is the profit-the money that comes in.
I was told when I agreed to pay my bill on the third per the recorded message that I had 14 days to pay…you cut me off anyway. The phones are not the tissue; your suspending my service means I cannot work. I may lose my job…how do you justify that? In any case? The least you could do would be to keep 4986 on and cut the phones off. But no. You refuse to compromise and meet the basic needs of your customer. What does that say about your company? I tried to call back on three separate occasions to tell you I couldn’t pay because of unexpected expenses but couldn’t get out of the automated system…sadly couldn’t get to a real person which also speaks volumes to me.
All this tells me this is a company I don’t wish to be affiliated with any more. As soon as I can, I will discontinue service with you…I know you could care less. I will honor the remaining portion of the contract but that’s it. You don’t deserve my business. I am a good, hardworking person who, at the sacrifice of myself and my needs, always pays her bills…albeit late at times. I realize others tell you stories and lies to justify themselves. That’s not me. If you knew what I had been through the last 7 yrs you would marvel that I am still on my feet…don’t judge too quickly. You could be wrong…and in my eyes you are by doing this to me.
God will see us through this extremely scary time of that I have no doubt. No thanks to your company and lack of understanding and mercy. I am doing the best I can. Sadly you are not.
See I have choices. MANY choices of providers for services you offer. I don’t have to be treated like this. I don’t have to succumb to your coldness and callousness. I intend to choose better (and cheaper). If your company doesn’t get the “people factor” back you will be sorry.Problem here is you admit you cannot afford the service.
And you want to blame Verizon for losing a job because you have no cell phone.
If your job depends on that phone I would pay it on time every time if you need a job to pay your bill.
No other service is going to treat you any different. And if you cannot afford Verizon's monthly invoice how are you going to afford new devices, activation fees, possible security deposits on any other cellular carrier? You can't.
Also if you made an arraignment to pay and then decide you cannot do so, why should Verizon extend you service or credit, or why is it you want to use the service and data and not pay for it as agreed.
Get a prepay phone. Its evident the cost is too high for you to afford on post pay.
Good Luck -
When I cull through my images in the filmstrip everytime I use my right arrow and rate a photo it jumps back to the first thumbnail and i have to arrow all the way back to where I left off. Is this a setting issue
Art,
I am trying to follow your very precise steps, and in my case (PSE11 also, Win7), the focus stays on the edited picture after I return from the editor to the Organizer. I am pretty sure that in the previous post describing your situation, I was able to reproduce the problem, but I don't remember on which version. I just tried in 'Folders' view mode to edit in a selected folder, then I clicked 'All media' so that no folder was selected. Same result in both cases.
Even if you prefer to work in folders view, you could take advantage of the ability to use 'albums'. It's a misleading word to describe a selection, a 'collection' of pictures, which you can sort as you want. It's a kind of 'playlist' like with music items. In the organizer, you can select a folder and create an album (even a temporary one) just by choosing 'create instant album'. Suppose you have made an album from a folder or a selection of highlighted pictures to edit. You can order them in date order, import batch or 'custom' order'. Since PSE12 you can also sort them in filename order. You should never lose the 'focus' on your last edited picture when coming back from the editor to the organizer. If the purpose of that album is only to help in organizing an editing session, you simply delete the album (the playlist) if you don't want to keep the list afterward.
I hope someone will be able to confirm how that can happen...
Edit;
I have just read Brian's post.
That may be the difference... -
I have updated my mac from snow leopard to mountain lion 3 days back. I had some important data in my library folder and it got overwritten. Is there any way i can get the data back from my snow leopard library folder?
I tried mackeeper to recover files but it could not. Any other way any one has tried to recover a system library folder after OS upgrade?No, it doesn't store a clone. You would have needed to make one with either SuperDuper or CarbonCopy Cloner.
If the files were in your ~/Library folder then they may still be there. As I said, you can access it by
going to your Finder "Go" menu hold the option key to choose "Library". I wouldn't think an upgrade would overwrite anything in ~/Library.
If you have a Time Machine backup you may also be able to use that to retrieve them. -
I have a full screen and cannot see my bookmarks.
How do I get my bookmarks to display again in a column on the left of my screen, just as it always has and the way I like them. I do not want to use full screen display without the bookmarks showing.View > Sidebar > Bookmarks (Ctrl+B)
Press F10 or tap the Alt key to bring up the "Menu Bar" temporarily. -
One day I just went on my iPod on messages and the log in sign showed up I tried logging in and it just brought me all the way back it is the same with FaceTime please help!
Try:
iOS: Troubleshooting FaceTime and iMessage activation -
Can anyone explain why on my iPhone 4S, whenever I play music, it won't hold my place in the song? I pause it, and then when I go back later, it's all the way back at the beginning? A google search was not very helpful, any tips would be great!
Try assigning Queen as the Album Artist on the compilations in iTunes on your computer.
-
Hi i have i problem with my iphone and the problem is the security question i have forgot the answers
I understand German and Italian i littlebit EnglishYou need to ask Apple to reset your security questions; this can be done by phoning AppleCare and asking for the Account Security team, or clicking here and picking a method, or if your country isn't listed in either article, filling out and submitting this form.
They wouldn't be security questions if they could be bypassed without Apple verifying your identity.
(106626) -
Had a problem with newest update and the advice from turingtest2 resolved my problem just to say thanks! Had never used this route before so was less painful than thought it would be again thanks.
how can i find out what the fix is that works..please
-
So what do I do about my iPhone5 and the way my batterie dies?
So what do I do about my iPhone5 and the way my batterie dies?
perhaps you might have gone to the Apple Service Center to spend a BIG 1000 bucks on it !
-
An app charged my credit card and the way the app described payment options, I believed it would charge me a monthly fee, not a yearly fee. I'd like the charge refunded, how can I do that?
You can Contact Apple for Refund by filling your personal Information in below link :
http://www.apple.com/emea/support/itunes/contact.html
Or You can directly Contact Apple Support Number and you will be routed to the concerned department.
http://support.apple.com/kb/he57
But its not 100% Guaranteed that they will issue a refund as per there Policy Terms.
But in extreme cases they gives you a Refund for 1 time as an excepiton. -
Scroll to the middle or bottom of a page with many links (like ebay) then close the link and when it returns to original page you are sent all the way back to the top of the page, why does it not switch back to the area of the page I was originally viewing?
Try here:
Tools > Options > Applications
Enter JPEG into the search box and change any that say "Save file" to "Always ask".
Does it work?
Edit: Forgot one other relevant setting. On:
Tools > Options >General tab
pick "Always ask me where to save files"
All good now? -
When I middle click the mouse it opens a new tab & also push my website to the top of the page and that is realy annoying when I need to drag all the way back to where I was
URL of your website? And an example of a hyperlink which does that?
-
My new iPhone 4s and my iPad 1 have the same problem: While working on one of them, the screen goes black and the right back to home screen. I've tried resetting the iPad with no chages to this problem. Need help, this is anoying.
I just did a reset all settings on both.
Will see where this gets me.
Thank you for your helpfull input.
Maybe you are looking for
-
Missing calls--pho​ne not ringing
Sometimes my phone acts like it's on silent mode: a call comes in and I can see it on the screen, but it's not making any ringing sound. The very next call rings just fine, even if it's the same person who just called when the phone was silent. Sound
-
HT2534 but i didn't find the NONE option on the under the card name
but i didn't find the NONE option on the under the card name
-
Hello, I am installing 11.1.1.7 Soa Suite etc, and given all the talk about Jrocket, decided to give that a spin. I am on Windows 7 when I do a simple java -version I get the following: [WARN ][osal ] Could not enumerate processes (1) error=-1073
-
The code is like this: package fjava.edu; import java.io.*; public class Point implements Serializable { // Methods... }Now, when i try to import "Point" I get problem. the importing class looks like this: import java.io.*; import javar.util.*; impor
-
RMAN database continuously restarting by its own
Hi Team, we have a database named RMAN version 10.2.0.3, which is continuously restarting for every 3 hours, I dont see any issue in alert log. This is a rman catalog database. Is this normal or is there a specific reason for this. Thanks and Regards