Difficult basics
Mikael Lundin
mikael.lundin at foi.se
Mon Feb 25 17:09:55 CET 2008
Dear group,
I am trying to get started with qt-jambi and the first "Hello world" example:
HelloWorld.java
--------------------------------------------------
import com.trolltech.qt.gui.*;
public class HelloWorld
{
public static void main(String args[])
{
QApplication.initialize(args);
QPushButton hello = new QPushButton("Hello World!");
hello.resize(120, 40);
hello.setWindowTitle("Hello World");
hello.show();
QApplication.exec();
}
}
----------------------------------------------------
I include qt-jambi bin directory in my PATH var:
PATH=C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Java\jdk1.6.0_02\bin;"C:\program files\qtjambi-win32-gpl-4.3.3_01\bin"
I compile with including qtjambi.jar in the classpath:
C:\>javac -classpath .;"C:\program files\qtjambi-win32-gpl-4.3.3_01\qtjambi.jar" HelloWorld.java
and I try run HelloWorld.class (also with classpath):
C:\>java -classpath .;"C:\program files\qtjambi-win32-gpl-4.3.3_01\qtjambi.jar" HelloWorld
which throws following error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: com.trolltech.qt.core.QtJambi_LibraryInitializer__qt_initLibrary()V
at com.trolltech.qt.core.QtJambi_LibraryInitializer.__qt_initLibrary(Native Method)
at com.trolltech.qt.core.QtJambi_LibraryInitializer.<clinit>(QtJambi_LibraryInitializer.java:10)
at com.trolltech.qt.core.QAbstractFileEngineHandler.<clinit>(QAbstractFileEngineHandler.java:10)
at com.trolltech.qt.QtJambi_LibraryInitializer.<clinit>(QtJambi_LibraryInitializer.java:29)
at com.trolltech.qt.QtJambiObject.<clinit>(QtJambiObject.java:29)
at HelloWorld.main(HelloWorld.java:6)
Anyone know what I missed in the installation/paths/etc ?
My system is Windows XP Prof. SP2
Regards,
Mikael
More information about the Qt-jambi-interest
mailing list