Linked by Thom Holwerda on Wed 6th Jun 2007 20:30 UTC, submitted by Eskil A. Blomfeldt
Qt After several technical previews and betas, Trolltech has launched Qt Jambi (Qt for Java) as a product under a dual licensing model (commercial and GPL license). There are also some product information and demos, and downloads for open source versions.
Permalink for comment 245935
To read all comments associated with this story, please click here.
RE[5]: Well, cool
by anda_skoa on Thu 7th Jun 2007 16:42 UTC in reply to "RE[4]: Well, cool"
anda_skoa
Member since:
2005-07-07

So if I understand correctly, the Generator (which sounds quite amazing by the way) is capable of letting you use C++ libraries in a Java project and compiling the thing to Java bytecode.


No.

The generator makes it easier to interface with C++ classes from Java code. Java itself provides a mechanism called Java Native Interface (JNI) which basically maps methods of a Java class to C functions.

The generator uses this mechanism but hides all the ugly conversion code, e.g. converting Java variable types to C++/Qt variable types.

The JNI approach usually starts with a Java class and uses a generator to create the C function declarations.

The Jambi generator starts with a C++ class declaration (header file) and creates the correspinding Java class and the C/C++ glue code.

Lets for example say that you have your own Qt Widget class, some domain specific widget not available in the base Qt set.

You run the Jambi generator on it and it will more or less create Java bindings for your class, so you can then use it from Java, including the option of subclassing it in Java and overriding C++ virtual methods through Java methods.

Reply Parent Score: 3