Trolltech Home | Qt-jambi-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-jambi-interest Archive, November 2007
Re: Problem running Qt Jambi on Mac OS X Leopard


Message 1 in thread

Falko Schumann wrote:
> Hi Gunnar,
> 
> yes, I started with this option. I programm with Qt since 2 years, very 
> successfully under Tiger ;-)
> 
> Try to instance QWidget ( new QWidget(null) ) before 
> QApplication.initialize()  has no effect. Java crashs with exit code 1.
> 
> But it's not important to use QWidget extending the application. It 
> works also with QObject, QVariant etc.
> 
> Best regards
> Falko

Hi Falko,

It took me a bit time to get around to this, but the problem is that on 
Thread.currentThread().getContextClassLoader() on Leopard returns null 
and we don't check for that, so we had an exception during startup, but 
the Mac OS VM did not report this properly.

I've attached two files with fixes for this misuse of the context class 
loader. You can replace the files in qtjambi.jar for these files and you 
should be able to run on leopard.

best regards,
Gunnar

Attachment:

Attachment: QClassPathFileEngineHandler.class
Description: Binary data

Attachment: Utilities.class
Description: Binary data


Message 2 in thread

Hi Gunnar,

I replaced the files and get a new Error.

bad class file: /Users/Shared/Developement/Trolltech/qtjambi-mac- 
gpl-4.3.2_01/qtjambi.jar(com/trolltech/qt/Utilities.class)
class file has wrong version 50.0, should be 49.0
Please remove or make sure it appears in the correct subdirectory of  
the classpath.

It look's like you compiled with Java 6. But Leopard use only Java 5.

By the way, the JVM report Java exit status 1 too. The error message  
above cames only if I try to import Utilities in my class.

Best regards
Falko



> Am 05.11.2007 um 14:32 schrieb Gunnar Sletta:
>
>> Falko Schumann wrote:
>>> Hi Gunnar,
>>> yes, I started with this option. I programm with Qt since 2 years,  
>>> very successfully under Tiger ;-)
>>> Try to instance QWidget ( new QWidget(null) ) before  
>>> QApplication.initialize()  has no effect. Java crashs with exit  
>>> code 1.
>>> But it's not important to use QWidget extending the application.  
>>> It works also with QObject, QVariant etc.
>>> Best regards
>>> Falko
>>
>> Hi Falko,
>>
>> It took me a bit time to get around to this, but the problem is  
>> that on Thread.currentThread().getContextClassLoader() on Leopard  
>> returns null and we don't check for that, so we had an exception  
>> during startup, but the Mac OS VM did not report this properly.
>>
>> I've attached two files with fixes for this misuse of the context  
>> class loader. You can replace the files in qtjambi.jar for these  
>> files and you should be able to run on leopard.
>>
>> best regards,
>> Gunnar
>> <QClassPathFileEngineHandler.class><Utilities.class>
>



Message 3 in thread

Falko Schumann wrote:
> Hi Gunnar,
> 
> I replaced the files and get a new Error.
> 
> bad class file: 
> /Users/Shared/Developement/Trolltech/qtjambi-mac-gpl-4.3.2_01/qtjambi.jar(com/trolltech/qt/Utilities.class) 
> 
> class file has wrong version 50.0, should be 49.0
> Please remove or make sure it appears in the correct subdirectory of the 
> classpath.
> 
> It look's like you compiled with Java 6. But Leopard use only Java 5.

My bad.. I recompiled on my windows box and forgot all about the 
-target. New files attached compiled with target 1.5.

-
Gunnar

Attachment:

Attachment: Utilities.class
Description: Binary data

Attachment: QClassPathFileEngineHandler.class
Description: Binary data


Message 4 in thread

Hi Gunnar,

Now it works smoothly. Thank you.

Best regards
Falko


Am 06.11.2007 um 09:15 schrieb Gunnar Sletta:

> Falko Schumann wrote:
>> Hi Gunnar,
>> I replaced the files and get a new Error.
>> bad class file: /Users/Shared/Developement/Trolltech/qtjambi-mac- 
>> gpl-4.3.2_01/qtjambi.jar(com/trolltech/qt/Utilities.class) class  
>> file has wrong version 50.0, should be 49.0
>> Please remove or make sure it appears in the correct subdirectory  
>> of the classpath.
>> It look's like you compiled with Java 6. But Leopard use only Java 5.
>
> My bad.. I recompiled on my windows box and forgot all about the - 
> target. New files attached compiled with target 1.5.
>
> -
> Gunnar
>
> <Utilities.class><QClassPathFileEngineHandler.class>