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.
Thread beginning with comment 245905
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[3]: Well, cool
by eskil on Thu 7th Jun 2007 15:12 UTC in reply to "RE[2]: Well, cool"
eskil
Member since:
2007-06-07

Do regular (C++, native-compiled) Qt apps also need Qt installed on the (Windows/Mac) end user's system?

No, neither Qt nor Qt Jambi requires this. Native libraries are usually bundled with the application, whether it's a Java application or a native application.

Also, as someone else asked, what advantages might Qt Jambi bring to the average Java developer over Swing and SWT?

Main points would be:
1. An API which we believe to be more intuitive, easy to learn, easy to read, with reasonable default behavior, and just plain more pleasant to use. This should be a big deal for people who do application development, as it allows them to focus on the tasks of their particular application, and not on battling the API they are using to develop it. In our experience, the alternatives out there have usability issues that Qt Jambi does not suffer from.

2. Professional support.

3. The ability to easily combine native and Java-code using Qt and Qt Jambi side-by-side, and using the Qt Jambi Generator, which is part of the package.

Reply Parent Score: 4

RE[4]: Well, cool
by Moochman on Thu 7th Jun 2007 16:15 in reply to "RE[3]: Well, cool"
Moochman Member since:
2005-07-06

Thanks for the info. If you'll bear with me, I have yet another couple of questions ;) :

Native libraries are usually bundled with the application, whether it's a Java application or a native application.

Okay, so in the case of a Mac app I'd guess that the native libraries are bundled in the program's app-folder, and in the case of Windows they're bundled in an installation program?

The ability to easily combine native and Java-code using Qt and Qt Jambi side-by-side, and using the Qt Jambi Generator, which is part of the package.

That is cool. 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. But to avoid confusion, Qt Jambi does not work the other way around; i.e. you can't integrate Java code into existing Qt projects and compile it all to a native platform, right?

Reply Parent Score: 2

RE[5]: Well, cool
by anda_skoa on Thu 7th Jun 2007 16:42 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