Board index » jbuilder » Using a C++BuilderX-Lib in JBuilder

Using a C++BuilderX-Lib in JBuilder


2005-08-24 03:21:43 PM
jbuilder3
Hi,
I'm new to Java and JBuilder. What I like to know is if there is a way to
"include" code from a library written in C++BuilderX?
Thanks in advance!
Björn
 
 

Re:Using a C++BuilderX-Lib in JBuilder

You will need to look at JNI: java.sun.com/j2se/1.4.2/docs/guide/jni/
- Alexey.
Björn Arnold wrote:
Quote
Hi,

I'm new to Java and JBuilder. What I like to know is if there is a way to
"include" code from a library written in C++BuilderX?
Thanks in advance!

Björn


--
Alexey N. Solofnenko
home: trelony.cjb.net/
 

Re:Using a C++BuilderX-Lib in JBuilder

"Björn Arnold" < XXXX@XXXXX.COM >wrote in message
Quote
Hi,

I'm new to Java and JBuilder. What I like to know is if there is a way to
"include" code from a library written in C++BuilderX?
Thanks in advance!

Björn

Basically two ways to do this.
One is to use the System.loadLibrary("<libraryName>"). This can be used to
call the native library and use the resulting outputs from the native
libary.
If you need to pass function params and the like, you will need to use JNI.
Here is a good tutorial on JNI.
java.sun.com/docs/books/tutorial/native1.1/index.html
 

{smallsort}