Hmmmm .....これは私の最初のQT Jambiアプリケーションであり、ウィンドウを起動する試みです。最初のQT Jambiアプリケーションで複数のランタイム例外がありますか?
java -XstartOnFirstThread -cp qtjambi-4.6.3.jar:qtjambi-examples-4.6.3.jar:qtjambi-macosx-gcc-4.6.3.jar:. GUI
ところで、私はMacBookの上のMac OS Xのライオン64ビットを実行している:
これは私が使用したターミナルコマンドです。
は、ここで上記のコマンドの結果です:
Exception in thread "main" java.lang.ExceptionInInitializerError at com.trolltech.qt.gui.QApplication.(QApplication.java:12) at GUI.main(GUI.java:9) Caused by: java.lang.RuntimeException: Loading library failed, progress so far: Unpacking .jar file: 'qtjambi-macosx-gcc-4.6.3.jar' Checking Archive 'qtjambi-macosx-gcc-4.6.3.jar' - cache key='gcc-20100817-1815' - adding 'libQtCore.4.dylib' to library map - library: name='lib/libQtCore.4.dylib', - adding 'libQtGui.4.dylib' to library map - library: name='lib/libQtGui.4.dylib', - adding 'libQtXml.4.dylib' to library map - library: name='lib/libQtXml.4.dylib', - adding 'libQtSql.4.dylib' to library map - library: name='lib/libQtSql.4.dylib', - adding 'libQtSvg.4.dylib' to library map - library: name='lib/libQtSvg.4.dylib', - adding 'libQtHelp.4.dylib' to library map - library: name='lib/libQtHelp.4.dylib', - adding 'libQtScript.4.dylib' to library map - library: name='lib/libQtScript.4.dylib', - adding 'libQtScriptTools.4.dylib' to library map - library: name='lib/libQtScriptTools.4.dylib', - adding 'libQtMultimedia.4.dylib' to library map - library: name='lib/libQtMultimedia.4.dylib', - adding 'libQtNetwork.4.dylib' to library map - library: name='lib/libQtNetwork.4.dylib', - adding 'libQtOpenGL.4.dylib' to library map - library: name='lib/libQtOpenGL.4.dylib', - adding 'libQtWebKit.4.dylib' to library map - library: name='lib/libQtWebKit.4.dylib', - adding 'libQtXmlPatterns.4.dylib' to library map - library: name='lib/libQtXmlPatterns.4.dylib', - adding 'libphonon.4.dylib' to library map - library: name='lib/libphonon.4.dylib', - adding 'libQtDBus.4.dylib' to library map - library: name='lib/libQtDBus.4.dylib', - library: name='plugins/phonon_backend/libphonon_qt7.dylib', never load - library: name='plugins/imageformats/libqjpeg.dylib', never load - library: name='plugins/imageformats/libqgif.dylib', never load - library: name='plugins/imageformats/libqmng.dylib', never load - library: name='plugins/imageformats/libqtiff.dylib', never load - library: name='plugins/imageformats/libqsvg.dylib', never load - library: name='plugins/iconengines/libqsvgicon.dylib', never load - library: name='plugins/codecs/libqcncodecs.dylib', never load - library: name='plugins/codecs/libqjpcodecs.dylib', never load - library: name='plugins/codecs/libqkrcodecs.dylib', never load - library: name='plugins/codecs/libqtwcodecs.dylib', never load - library: name='plugins/accessible/libqtaccessiblewidgets.dylib', never load - library: name='plugins/sqldrivers/libqsqlite.dylib', never load - adding 'libqtjambi.jnilib' to library map - library: name='lib/libqtjambi.jnilib', - adding 'libcom_trolltech_qt_core.jnilib' to library map - library: name='lib/libcom_trolltech_qt_core.jnilib', - adding 'libcom_trolltech_qt_gui.jnilib' to library map - library: name='lib/libcom_trolltech_qt_gui.jnilib',
- adding 'libcom_trolltech_qt_xml.jnilib' to library map
- library: name='lib/libcom_trolltech_qt_xml.jnilib',
- adding 'libcom_trolltech_qt_sql.jnilib' to library map
- library: name='lib/libcom_trolltech_qt_sql.jnilib',
- adding 'libcom_trolltech_qt_svg.jnilib' to library map
- library: name='lib/libcom_trolltech_qt_svg.jnilib',
- adding 'libcom_trolltech_qt_help.jnilib' to library map
- library: name='lib/libcom_trolltech_qt_help.jnilib',
- adding 'libcom_trolltech_qt_script.jnilib' to library map
- library: name='lib/libcom_trolltech_qt_script.jnilib',
- adding 'libcom_trolltech_qt_scripttools.jnilib' to library map
- library: name='lib/libcom_trolltech_qt_scripttools.jnilib',
- adding 'libcom_trolltech_qt_multimedia.jnilib' to library map
- library: name='lib/libcom_trolltech_qt_multimedia.jnilib',
- adding 'libcom_trolltech_qt_network.jnilib' to library map
- library: name='lib/libcom_trolltech_qt_network.jnilib',
- adding 'libcom_trolltech_qt_opengl.jnilib' to library map
- library: name='lib/libcom_trolltech_qt_opengl.jnilib',
- adding 'libcom_trolltech_qt_phonon.jnilib' to library map
- library: name='lib/libcom_trolltech_qt_phonon.jnilib',
- adding 'libcom_trolltech_qt_webkit.jnilib' to library map
- library: name='lib/libcom_trolltech_qt_webkit.jnilib',
- adding 'libcom_trolltech_qt_xmlpatterns.jnilib' to library map
- library: name='lib/libcom_trolltech_qt_xmlpatterns.jnilib',
- adding 'classes.nib' to library map
- library: name='lib/Resources/qt_menu.nib/classes.nib',
- adding 'info.nib' to library map
- library: name='lib/Resources/qt_menu.nib/info.nib',
- adding 'keyedobjects.nib' to library map
- library: name='lib/Resources/qt_menu.nib/keyedobjects.nib',
- plugin path='plugins'
- using cache directory: '/var/folders/4p/s98fh7114t5g3y05fh59ctpm0000gn/T/QtJambi_b-dahse_x86_64_4.6.3_gcc-20100817-1815'
- cache directory exists Loading library: 'libQtCore.4.dylib'...
- using deployment spec
- ok! Loading library: 'libqtjambi.jnilib'...
- using deployment spec
- ok! Loading library: 'libQtCore.4.dylib'...
- already loaded, skipping... Loading library: 'libcom_trolltech_qt_core.jnilib'...
- using deployment spec
- ok! Loading library: 'libQtGui.4.dylib'...
using deployment spec
at com.trolltech.qt.internal.NativeLibraryManager.loadNativeLibrary(NativeLibraryManager.java:431) at com.trolltech.qt.internal.NativeLibraryManager.loadQtLibrary(NativeLibraryManager.java:355) at com.trolltech.qt.Utilities.loadQtLibrary(Utilities.java:145) at com.trolltech.qt.Utilities.loadQtLibrary(Utilities.java:141) at com.trolltech.qt.gui.QtJambi_LibraryInitializer.(QtJambi_LibraryInitializer.java:7) ... 2 more Caused by: java.lang.UnsatisfiedLinkError: /private/var/folders/4p/s98fh7114t5g3y05fh59ctpm0000gn/T/QtJambi_b-dahse_x86_64_4.6.3_gcc-20100817-1815/lib/libQtGui.4.dylib: Library not loaded: /opt/local/lib/libpng12.0.dylib Referenced from: /private/var/folders/4p/s98fh7114t5g3y05fh59ctpm0000gn/T/QtJambi_b-dahse_x86_64_4.6.3_gcc-20100817-1815/lib/libQtGui.4.dylib Reason: image not found
at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1827) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1703) at java.lang.Runtime.load0(Runtime.java:770) at java.lang.Runtime.load(Runtime.java:758) at com.trolltech.qt.internal.NativeLibraryManager.loadLibrary_helper(NativeLibraryManager.java:458) at com.trolltech.qt.internal.NativeLibraryManager.loadNativeLibrary(NativeLibraryManager.java:426) ... 6 more
はここGUI.javaのソースコードです:
import gui.ViewWindow;
import com.trolltech.qt.gui.QApplication;
public class GUI {
public static ViewWindow viewWindow;
public static void main(String[] args) {
QApplication.initialize(args);
viewWindow = new ViewWindow();
QApplication.exec();
}
}
そして、ここではViewWindow.javaです:
package gui;
import com.trolltech.qt.gui.QWidget;
public class ViewWindow extends QWidget {
public ViewWindow() {
setWindowTitle("Level editor for Ben's Great Escape");
resize(1000, 600);
move(0, 0);
show();
}
}
私は非常に混乱し、今圧倒されていますので、これまで見たことのある人なら、あなたが持っている可能性のある情報を見て投稿してください。ます。java.lang.UnsatisfiedLinkError:
によって引き起こさ:
ああ.. MacOSXバージョンでは./binpatch? * .dylibの絶対パスを変更するツールです。私はこのツールが使用されていることを認識していませんでした。 binpatchは、libpngを見つけるために配布を修正するかもしれません。 –