GIDForums  

Go Back   GIDForums > Computer Programming Forums > Java Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 26-Jul-2009, 11:02
KarNaF KarNaF is offline
New Member
 
Join Date: Dec 2008
Posts: 2
KarNaF is on a distinguished road

JNI - can't get back value


Hi,
I'm trying to write a program in C++ that uses JNI to call a function i have in java. The problem is when my function in java calls another function in java (which i don't have), i'm always getting back the value 0.0, but when i run the same function in java the values are correct.
Let's say that my code from c++ calls the function JFunc1, and JFunc1 calls another java function JFunc2, then when i return the value of JFunc2, i'm getting 0.0 in my c++ program.
What could be the problem?
Thanx alot
  #2  
Old 07-Aug-2009, 06:28
Mexican Bob's Avatar
Mexican Bob Mexican Bob is offline
Member
 
Join Date: Mar 2008
Location: Chicxulub, Yucatán
Posts: 226
Mexican Bob is a jewel in the roughMexican Bob is a jewel in the roughMexican Bob is a jewel in the rough

Re: JNI - can't get back value


Quote:
Originally Posted by KarNaF
Hi,
What could be the problem?
Thanx a lot

The problem could be that you didn't show us any code from which to debug or offer recommendations for changes. In other words, you're asking us to give you a fix without being able to see the problem, only hear what you decided was adequate to explain the problem. There are too many "things" in code that can go wrong with the implementation of a given technology, such as JNI, when used improperly that a limited explanation cannot reveal.

If the code is too complex, too secret or too "big" to easily post, then write the simplest possible set of code that reproduces the problems that you're seeing and post that code. Chances are during that process, you'll discover the reason(s) and come up with a fix on your own.

An explanation of what you're trying to do--without the implementation--does not help us fix the problem with your code or your understanding of how to use the technology.


MxB
 
 

Recent GIDBlogOnce again, no time for hobbies by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
24/7/365 SUPPORT! Reseller/Shared cPanel Hosting, 99.9% uptime, 30 day money back! apthost Web Hosting Advertisements & Offers 0 09-May-2007 16:00
**Huge Sale!** Open For 6 Years - 99.9% Uptime 30 Day Money Back Guarantee apthost Web Hosting Advertisements & Offers 0 02-Feb-2007 06:37
Shapes Functions Version 2 - Arrays! Cecil C Programming Language 1 09-Jul-2006 21:39
$5 Hosting 3.5gb/40gbs!! 99.9% Uptime, 30 Day Money Back, Live Telephone/Chat Support Xeserve Web Hosting Advertisements & Offers 0 17-Mar-2006 13:28
STL list of list with jump back AGU C++ Forum 0 22-Mar-2005 12:16

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 21:06.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.