![]() |
|
|
|
#1 |
|
What is the procedure used to call C/C++ code in library from Java?
TIA, -Ramon F Herrera Ramon F Herrera |
|
|
|
|
#2 |
|
Posts: n/a
|
Ramon F Herrera <> wrote:
> What is the procedure used to call C/C++ code in library from Java? Google "JNI" -- www.designacourse.com The Easiest Way To Train Anyone... Anywhere. Chris Smith - Lead Software Developer/Technical Trainer MindIQ Corporation Chris Smith |
|
|
|
#3 |
|
Posts: n/a
|
In article < .com>,
"Ramon F Herrera" <> wrote: > What is the procedure used to call C/C++ code in library from Java? > > TIA, > > -Ramon F Herrera http://java.sun.com/docs/books/tutor...ve1.1/TOC.html It sucks at first because you'll be facing an overwhelming number of bugs in your code. After a while you get the hang of it and it's pretty easy. Run a leak check utility when you're using JNI. You'll leak memory if you don't handle Java strings and arrays properly. Kevin McMurtrie |
|
|
|
#4 |
|
Posts: n/a
|
On Mon, 28 Mar 2005 23:16:59 -0800, Kevin McMurtrie
<> wrote: > In article < .com>, > "Ramon F Herrera" <> wrote: > >> What is the procedure used to call C/C++ code in library from Java? >> >> TIA, >> >> -Ramon F Herrera > > http://java.sun.com/docs/books/tutor...ve1.1/TOC.html > > It sucks at first because you'll be facing an overwhelming number of > bugs in your code. After a while you get the hang of it and it's pretty > easy. > > Run a leak check utility when you're using JNI. You'll leak memory if > you don't handle Java strings and arrays properly. What would leak memory (which process?), and which type of utility would you recommend to detect this? Richard Chrenko |
|
|
|
#5 |
|
Posts: n/a
|
You may want to take at Jenie, www.servertec.com/products/jenie/jenie.html
Jenie is a collection of Java Classes and supporting native libraries that allows developers to directly access native libraries without having to use Java Native Interface (JNI) and without having to write C/C++ code. "Ramon F Herrera" <> wrote in message news: oups.com... > What is the procedure used to call C/C++ code in library from Java? > > TIA, > > -Ramon F Herrera > Manuel J. Goyenechea |
|
|
|
#6 |
|
Posts: n/a
|
In article <>,
"Richard Chrenko" <> wrote: > On Mon, 28 Mar 2005 23:16:59 -0800, Kevin McMurtrie > <> wrote: > > > In article < .com>, > > "Ramon F Herrera" <> wrote: > > > >> What is the procedure used to call C/C++ code in library from Java? > >> > >> TIA, > >> > >> -Ramon F Herrera > > > > http://java.sun.com/docs/books/tutor...ve1.1/TOC.html > > > > It sucks at first because you'll be facing an overwhelming number of > > bugs in your code. After a while you get the hang of it and it's pretty > > easy. > > > > Run a leak check utility when you're using JNI. You'll leak memory if > > you don't handle Java strings and arrays properly. > > > What would leak memory (which process?), and which type of utility would > you recommend to detect this? Which process? It's all one with JNI. It's possible to leak in the process heap and the Java heap. I've been using 'leaks' that comes with OS X. It scans for memory allocations that don't appear to have any pointer to them. It's a little slow and imperfect but it points out big leaks as bright as day. When the environment variable "MallocStackLogging" is set, all allocations are tagged with a stack trace that shows up in the output of 'leaks' and other debugging tools. It's very cool. Kevin McMurtrie |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Java code to send MS Outlook Tasks | mansi | Software | 0 | 03-03-2009 09:20 AM |
| Java Error: java.lang.ClassFormatError: oracle/jdbc/ttc7/TTC7Protocol | Shalz | Software | 0 | 03-08-2008 06:05 PM |
| Java Beginners | Still Bill | Software | 3 | 02-19-2008 10:13 AM |
| How To Access HTML elements in code behind??? | nedums_b | Software | 1 | 02-07-2008 07:15 PM |
| Calling Java methods in C | boyabhi123 | Software | 0 | 08-02-2007 10:42 AM |