Solved [SOLVED]Qt with JAVA
-
[SOLVED]I want to access/use java code in Qt without help of Qt Jambi. How can I? I show one feature, In that I can add .java file as other file. I want to know how can I access it? Please give some idea to develop application on JAVA based on Qt.
-
@Tejas-Virpariya said:
Hi
Qt Jambi is a binding for Qt.
Without such binding. its is not possible.
So to use Qt from java, u need such binding. -
@Tejas-Virpariya
Is this the same post http://forum.qt.io/topic/63784/qt-jambi ? -
"I want to access/use java code in Qt" - what do you mean by this? Qt is a C++ framework, not a programming language. Do you want to access Java code from C++ or do you want to use Qt in Java?
-
I bookmarked this old thread (for future reference) which writes that QProcess can be used to run java app
http://www.qtcentre.org/threads/57116-SOLVED-QProcess-Java-Application-Not-Working
-
@eureka Sure, you can use QProcess to run an Java application. But the topic of this thread is not related to external processes.
-
You can't mix those languages.
Because C++ is native and Java is run in a virtual machine. -
@jacmoe That's the goal of QtJambi: provide Java binding for Qt.
-
@SGaist Yes, I know :)
And I also know that you can use JNI - but the way that I understand the OP is that he wants to just drop a java file and expect Qt (QtCreator? or C++?) to handle it automatically.
QtJambi is pretty cool if you want a great library like Qt and use Java as a language. :) -
@Ratzz : First I try to use java code in QT with help of Qt Jambi, but didn't get help how to use Qt Jambi, So I try to find other way to use Java class or file in Qt/C++. That's way I ask this question.
-
@jsulm : I want to access Java code from C++. If I added java file in my normal QT/C++ project then How can I get access java code from main.cpp file?
-
You can't do that, it's the other way around: you write java code that will make use of Qt Jambi bindings to use Qt.
As for examples, you have examples there on the QtJambi web site.
-
Finally decide to drop this topic. Use C++ with QT.
-
Hi @Tejas-Virpariya ,
Marking "solved" can be done from the option at the right bottom , you can see the "Topic Tools" and there opt for "Marked Solved ".