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

Qt-jambi-interest Archive, February 2007
Missing bitmaps with Java webstart and Java 6 under Windows XP


Message 1 in thread

Hello

I have trouble getting Qt Jambi applications using the Java Webstart 
mechanism to run properly with Java 6 under Windows XP.

The problem is, that bitmaps and icons are not displayed in the 
application window. The attached screenshot demonstrates this issue with 
demo application from 
http://www.trolltech.com/developer/download/qtjambi.jnlp. My own Qt 
Jambi application shows the same behaviour.

The problem does not occur with Java 5 or on Linux.

BTW: I tested this with a fresh install of Windows XP and Java 6.

Is there a solution for this issue? Any help would be very welcome.

Best reagrds,
Roman Geus

-- 
 [ signature omitted ] 

JPEG image


Message 2 in thread

Hi, Roman.

Roman Geus wrote:

> I have trouble getting Qt Jambi applications using the Java Webstart 
> mechanism to run properly with Java 6 under Windows XP.
>

I was actually just investigating this issue.

Initially this seems like a bug in the Java Web Start 1.6 class loader 
to me, because it throws an exception which indicates that it may not 
have been able to read the constant pool in the class files correctly. 
When running the identical code with Java Web Start 1.5 (and still the 
Java 1.6 run time) everything should work perfectly, and the exception 
does not get thrown.

Currently, I can't give you any other advice than to install the Java 
1.5 run time in addition to Java 1.6, and using its javaws.exe to run 
the web start. Using the previous version of this executable should be 
sufficient to run the Qt Jambi Web Start.

We will of course do what we can to resolve this, whether the bug lies 
with us or Sun.

-- Eskil


Message 3 in thread

Roman Geus wrote:

> The problem is, that bitmaps and icons are not displayed in the 
> application window. The attached screenshot demonstrates this issue 
> with demo application from 
> http://www.trolltech.com/developer/download/qtjambi.jnlp. My own Qt 
> Jambi application shows the same behaviour.
>

The first time I read this, I seemed to have missed the fact that the 
same thing happens with your own Web Start application. What exactly do 
you mean by "the same behavior?" Is you application similar to our 
"Examples and Demos" application?

Could you turn on the Web Start Console (run "javaws -viewer", then 
select the "Advanced" tab in the preferences and set "Java Console" to 
"Show") and see if your application has any exceptions, and could you 
please post the stack trace here. It would be very helpful to us to try 
to pinpoint where the problem occurs.

-- Eskil


Message 4 in thread

Thanks for the fast response.

Eskil A. Blomfeldt wrote:
> Roman Geus wrote:
>
>> The problem is, that bitmaps and icons are not displayed in the 
>> application window. The attached screenshot demonstrates this issue 
>> with demo application from 
>> http://www.trolltech.com/developer/download/qtjambi.jnlp. My own Qt 
>> Jambi application shows the same behaviour.
>>
>
> The first time I read this, I seemed to have missed the fact that the 
> same thing happens with your own Web Start application. What exactly 
> do you mean by "the same behavior?" Is you application similar to our 
> "Examples and Demos" application?
In our application no icons and bitmaps are displayed (with the Java 6 & 
webstart combination). E.g. this simple method should display an About 
box with an image.

    public void on_actionAbout_IDok_triggered() {
        QDialog d = new QDialog(this);
        Ui_AboutImageViewer ui = new Ui_AboutImageViewer();
        ui.setupUi(d);
        QPixmap pixmap = new 
QPixmap("classpath:ch/psi/dms/qtgui/images/help-books.png");
        ui.label.setPixmap(pixmap);
        d.exec();
        d.dispose();
    }

The pixmap variable references a QPixmap object, i.e. is not null. 
However the image help-books.png is simply not displayed.

I suspect that there is a problem how Qt Jambi is loading resources from 
JAR files.
There is no problem with resources that the application loads "manually" 
using c.getResourceAsStream().

Please note also that if the application is started without the webstart 
mechanism it works as expected.

>
> Could you turn on the Web Start Console (run "javaws -viewer", then 
> select the "Advanced" tab in the preferences and set "Java Console" to 
> "Show") and see if your application has any exceptions, and could you 
> please post the stack trace here. It would be very helpful to us to 
> try to pinpoint where the problem occurs.
I didn't notice any exceptions in the Java Console or in our log files.
>
> -- Eskil
>
Roman

-- 
 [ signature omitted ] 

Message 5 in thread

Hi, Roman.

Roman Geus wrote:

> The pixmap variable references a QPixmap object, i.e. is not null. 
> However the image help-books.png is simply not displayed.
>
> I suspect that there is a problem how Qt Jambi is loading resources 
> from JAR files.
> There is no problem with resources that the application loads 
> "manually" using c.getResourceAsStream().


That sounds plausible, although exceptions thrown from the Examples and 
Demos application seem to indicate that something else is happening. I'm 
not sure, but I'll look into this immediately, and get back to you when 
I know something.

-- Eskil


Message 6 in thread

Roman Geus wrote:
> Hello
>
> I have trouble getting Qt Jambi applications using the Java Webstart 
> mechanism to run properly with Java 6 under Windows XP.
>
> The problem is, that bitmaps and icons are not displayed in the 
> application window. The attached screenshot demonstrates this issue 
> with demo application from 
> http://www.trolltech.com/developer/download/qtjambi.jnlp. My own Qt 
> Jambi application shows the same behaviour.
>
> The problem does not occur with Java 5 or on Linux.
To state more precisely:
The problem occurs with Java 6 on WinXP and on Linux.
The problem does not occur with Java 5 on WinXP and on Linux.

Roman
<http://dict.leo.org/ende?lp=ende&p=/gQPU.&search=to>

-- 
 [ signature omitted ] 

Message 7 in thread

Hi, Roman.

Roman Geus wrote:

>> I have trouble getting Qt Jambi applications using the Java Webstart 
>> mechanism to run properly with Java 6 under Windows XP.
>>
>>
> To state more precisely:
> The problem occurs with Java 6 on WinXP and on Linux.
> The problem does not occur with Java 5 on WinXP and on Linux.
>

This is due to a behavioral change in the Java Web Start class loader. I 
made a fix for it yesterday, and will work to get the web start on the 
web updated. The fix will also make it into Qt Jambi Beta 2.

-- Eskil