Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help: How to pass an array to a C++ class via JNI?

Status
Not open for further replies.

maelyn

Technical User
Nov 15, 2000
1
SG
Hi all,

I need help with this:

An array of values that has been given by the user thru HTTP post method is to be passed to a piece of code in C++ that does calculations. To do that, the C++ code must be wrapped with JNI.
(The size of array is determined by the user first).

My questions are: how do I pass this array by way of JSP? Does doing this in a 2-tier system require anything different from just doing it in a single PC? If I were to separate the JSP pages and the C++ code so that the former resides in the webserver, and the latter in the application server, how would I use RMI to pass values/results between the two?

My concerns here are to reuse the existing native code and to obtain maximum performance since the native code can probably calculate much faster. I don't want to convert the C++ code to Java as it is a pretty long and complex piece of code.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top