Qt Jambi, Trolltech releases Qt for Java
Hardingfela writes "Trolltech has released a preview of its long awaited Java bindings for Qt 4. "Qt Jambi technology integrates Qt with the Java programming language, providing new possibilities for both Java and C++ programmers. This technology enables Java developers to take advantage of the powerful features of Qt from within Java Standard Edition 5.0 and Java Enterprise Edition 5.0" More information on the
Jambi press release and tech details in the Jambi whitepaper. To get your copy sign up to the preview license (final release will be also available under an open source license) and download."
Well, I for one welcome our new void setText(String overlords);
7h3$3 4r3n'7 7h3 Ðr01Ð$ ¥0 4r3 £00|{1n9 f0r. M0v3 4£0n9. --OB1
Mekka Hiney Ho.
Badass Resumes
So now I get to see Java apps using the ever horrible QT as well as compiled binaries?
"Oh boy"
When will we see bindings for the most popular language?
The combination of fast, good looking Qt widgets, the clean way of writing applications with Qt and the ease of coding that java and Eclipse offer make for a very attractive platform for clean and fast development of graphical applications and great alternative to pure java or mono applications. As long as the Qt library can be easily distributed with the applications that use it, the fact that you're more than one framework should not be a problem.
If version 6 of java will not bring the improvements to the GUI that are promised, Qt + Java is a very attractive alternative for crossplatform development.
Personally, I like Qt's widgets a lot (even though version 4 has a few funny regressions) and the logic used for building the GUI is much nicer than what I know from Swing and AWT. I wish the trolls the best of luck and hope that KDE and free software in general may benefit from this development.
DNA is the ultimate spaghetti code.
It will take 10,000 days to code anything useful.
Never. Those of us who use C are smart enough to know that QT is fucking ugly and that GTK is far superior.
by Anonymous Coward on Monday July 31, @01:31PM
It will take 10,000 days to code anything useful.
Another, although not as funny, reference to Jambi from Pee-wee's Playhouse.
So will Qt Java be supporting widget primitives in Windows like it does for other languages? I'll bet it does, and that will be quite cool, as we will finally see Java apps that truly look & feel native!
I've been playing around with this for a few hours. Running some of their demos, things seem very snappy, and the applications look better than most Swing/AWT applications. I've always been fond of the way Qt works, and I think it will be nice to have the option of using it with Java.
Of course this is still a developer preview. After playing around with it for about 4 hours, I still can't get an application to launch, except for the demos that it ships with. This is probably due to my own ineptitude, but if I'm having trouble with it, I'm sure other developers will as well. I suspect that once there is an official release, things will be made easier (or the documentation will be made clearer) and there won't be so many problems.
PS: If anyone has played around with this and had success, maybe you can help me out. I created a project in eclipse, added the qtjambi.jar file into the classpath, set the PATH to qtjambi-linux-preview/bin and LD_LIBRARY_PATH to qtjabmi-linux-preview/lib, whenever I try to launch an application, I get
failed to load library: 'qtjambi'
Exception in thread "main" java.lang.UnsatisfiedLinkError: no qtjambi in java.library.path
...
Anyway, I think it will be really nice once I can figure out how to use it properly.
Famous Last Words: "hmm...wikipedia says it's edible"
Why?
Has anyone using the QT API noticed that its behavior when it hits an error isn't well-defined or easily detectable by the user of the library? For instance, look at QFileInfo's size member function.
Returns the file size in bytes, or 0 if the file does not exist or if the size is 0 or if the size cannot be fetched.
So, if it returns a zero, that could mean that there is a problem that your application may need to do something about or report, or the file does not exist, or the file exists but is zero bytes. How incredibly uninformative. But at least that member function documents its behavior it something bad happens. As I glanced through the other member functions, it became apparent that most of them do not bother to say what happens when the shit hits the fan. No return codes, no exceptions, no nothing.
Sadly, many of the classes in the library are like this. Sure, I could write an application using QT, but I wouldn't know how to handle failures simply because QT doesn't document the behavior in those cases. This is surprising, considering that QT is considered a quality library that is worthy of use in commercial applications. Granted, most of the time, we'll only execute the "happy path", and there will be no problems with this lack of documentation. However, we shouldn't throw caution to the wind and assume everything will be OK.
I can't help but think that this could have been avoided if QT would have embraced exceptions. Then, the API could avoid using C-like return codes and maintain its elegance but still report errors in a manner that is convenient for handling and documentation. QFileInfo::size() could be documented to throw QFileNotFoundException and QIOException, for example, making it easy for the user of the class to tell what happened. But they would have to rethink some of their code if they did this, because the naked-pointer-filled code that they have now would not be exception safe at all. I doubt that they will make the switch any time soon because everyone seems to be so happy with it the way it is today.
For those of us, who want to be more productive or rather expressive, can try ruby bindings: http://developer.kde.org/language-bindings/ruby/in dex.html
Its still doesn't works on M$ Windows(and if you managed to compile it on Windowz, then kindly send me howto?), but is a joy to develop on Linux.Just don't forget to throw in http://rubyforge.org/projects/rubyinline/ , when you want to do something that really takes CPU cycles and memory.
I can't really see the point of Java(yuck) bindings.Though people at KDE camp were happy, finally they can have fully functional java plugin for konqueror. bless them.