I compiled a HelloWorld example using QtJambi. But on running it, it said "failed to unpack native libraries. The complete error was :
daud@daud-laptop:~$ java -d32 com.trolltech.examples.tutorial.HelloWorld
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.trolltech.qt.QtJambiObject.<clinit>(QtJambiObject.java:60)
at com.trolltech.examples.tutorial.HelloWorld.main(HelloWorld.java:58)
Caused by: java.lang.RuntimeException: Loading library failed, progress so far:
Unpacking .jar file: 'qtjambi-linux32-gcc-4.6.3.jar'
Checking Archive 'qtjambi-linux32-gcc-4.6.3.jar'
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.QtJambi_LibraryInitializer.<clinit>(QtJambi_LibraryInitializer.java:56)
... 2 more
Caused by: java.lang.RuntimeException: Failed to unpack native libraries, progress so far:
Unpacking .jar file: 'qtjambi-linux32-gcc-4.6.3.jar'
Checking Archive 'qtjambi-linux32-gcc-4.6.3.jar'
at com.trolltech.qt.internal.NativeLibraryManager.unpack(NativeLibraryManager.java:368)
at com.trolltech.qt.internal.NativeLibraryManager.loadLibrary_helper(NativeLibraryManager.java:437)
at com.trolltech.qt.internal.NativeLibraryManager.loadNativeLibrary(NativeLibraryManager.java:426)
... 6 more
Caused by: java.lang.NoClassDefFoundError: com/trolltech/qt/internal/OSInfo
at com.trolltech.qt.internal.NativeLibraryManager$XMLHandler.startElement(NativeLibraryManager.java:241)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:767)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1359)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$ContentDriver.scanRootElementHook(XMLDocumentScannerImpl.java:1317)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3095)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:922)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
at com.trolltech.qt.internal.NativeLibraryManager.readDeploySpec(NativeLibraryManager.java:506)
at com.trolltech.qt.internal.NativeLibraryManager.unpackDeploymentSpec(NativeLibraryManager.java:524)
at com.trolltech.qt.internal.NativeLibraryManager.unpack_helper(NativeLibraryManager.java:392)
at com.trolltech.qt.internal.NativeLibraryManager.unpack(NativeLibraryManager.java:363)
... 8 more
Caused by: java.lang.ClassNotFoundException: com.trolltech.qt.internal.OSInfo
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 28 more
That its not able to find the native libraries may mean that I have to include the path to JNI libraries in some environment variable. What should I do ?