NetBSD-Java archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: openjdk 1.7.0 attempt



David Brownlee wrote:
>2009/10/13 Robert Swindells <rjs%fdy2.demon.co.uk@localhost>
>> Patrick Welche wrote:
>> >I just had a go with jdk1.7.0-200905020i386-netBSD-5.0.tar.bz2 on a
>> >5.99.12/i386 box, and my first swing programme:
>>
>> [snip]
>>
>> >% java hellow
>> >Exception in thread "AWT-EventQueue-0"
>> >java.lang.ArrayIndexOutOfBoundsException: 0
>> >        at sun.awt.X11.XIconInfo.<init>(XIconInfo.java:74)
>> >        at
>> sun.awt.X11.XWindowPeer.getDefaultIconInfo(XWindowPeer.java:406)
>> >        at sun.awt.X11.XWindowPeer.updateIconImages(XWindowPeer.java:308)
>>
>> [snip]
>>
>> I get the same error with any graphical application too.
>>
>> I think this may be a build problem with the openjdk7-bin package.
>>
>> The exception is generated because the arrays of icon data in rt.jar
>> are zero length. The class files containing the icon data have been
>> automatically generated from .png files using a java app (in
>> ToBin.java) which renders them then extracts the raw data.
>>
>> I haven't found a way to get ToBin to fail yet, it still works if
>> DISPLAY isn't set. Which JDK was used to build the binary package ?
>>
>> Robert Swindells
>
>Have you tried the wip/openjdk package? I've found I'm able to run
>graphical java apps without issues (much kudos to those who worked on
>it).

I haven't tried it yet but will do, I have had a look at it. My guess
is that openjdk7-bin was built using a JDK that didn't have png
support, wip/openjdk won't have this problem as it rebuilds itself
after the initial cross-compile has finished.

I just rebuilt the icon files using openjdk7-bin and patched rt.jar,
the graphical demos work fine for me now.

I have put a tarball of the fixed class files onto ftp.n.o at:

ftp://ftp.netbsd.org/pub/NetBSD/misc/rjs/rt-patch.tar.bz2

To use it, untar it somewhere then run:

# jar uvf /usr/pkg/java/openjdk-bin/jre/lib/rt.jar sun/awt/X11/*.class

Robert Swindells


Home | Main Index | Thread Index | Old Index