Re: Which java jdk to use on -CURRENT?

From: Alexandre \ <alex.kovalenko_at_verizon.net>
Date: Wed, 10 Oct 2007 09:44:47 -0400
On Wed, 2007-10-10 at 14:55 +0200, Peter van Heusden wrote:
> Hi
> 
> I am having trouble getting a working jdk on -CURRENT. Thus far, I have
> diablo-jdk-1.5.0.07.01_7 installed, but it is dumping core in various
> circumstances - for instance when used as part of OpenOffice, trying to
> run Sun Download Manager, etc. I have tried installing the java/jdk16
> port, but got this:
> 
> Packing
> /usr/ports/java/jdk16/work/control/build/bsd-i586/j2re-image/lib/rt.jar
> 47602320 bytes
> Exception in thread "main" java.lang.AssertionError
>         at
> com.sun.java.util.jar.pack.ClassReader.readRef(ClassReader.java:90)
>         at
> com.sun.java.util.jar.pack.ClassReader.readUtf8Ref(ClassReader.java:102)
>         at
> com.sun.java.util.jar.pack.ClassReader.readMember(ClassReader.java:306)
>         at
> com.sun.java.util.jar.pack.ClassReader.readMembers(ClassReader.java:300)
>         at com.sun.java.util.jar.pack.ClassReader.read(ClassReader.java:126)
>         at
> com.sun.java.util.jar.pack.PackerImpl$DoPack.readClass(PackerImpl.java:490)
>         at
> com.sun.java.util.jar.pack.PackerImpl$DoPack.run(PackerImpl.java:464)
>         at com.sun.java.util.jar.pack.PackerImpl.pack(PackerImpl.java:73)
>         at com.sun.java.util.jar.pack.Driver.main(Driver.java:261)
> gmake[3]: *** [pack-jars] Error 1
> gmake[3]: Leaving directory `/usr/ports/java/jdk16/work/install/make/pack'
> gmake[2]: *** [pack-jre] Error 2
> gmake[2]: Leaving directory `/usr/ports/java/jdk16/work/install/make/pack'
> gmake[1]: *** [all] Error 1
> gmake[1]: Leaving directory `/usr/ports/java/jdk16/work/install/make'
> gmake: *** [install-build] Error 2
> *** Error code 2
> 
> Stop in /usr/ports/java/jdk16.
> *** Error code 1
> 
> Stop in /usr/ports/java/jdk16.
> 
> and for the java/jdk15 port, I get this:
> 
> ../../../../../src/share/classes/java/nio/Bits.java:19: duplicate class:
> Bits
> class Bits {                            // package-private
> ^
> ../../../../../src/solaris/classes/sun/net/www/protocol/file/Handler.java:26:
> duplicate class: Handler
> public class Handler extends URLStreamHandler {
>        ^
> ../../../../../src/share/classes/java/lang/Class.java:10: cannot access
> java.lang.reflect.Array
> bad class file:
> ../../../../../src/share/classes/java/lang/reflect/Array.java
> file does not contain class java.lang.reflect.Array
> Please remove or make sure it appears in the correct subdirectory of the
> classpath.
> import java.lang.reflect.Array;
>                          ^
> 3 errors
> gmake[7]: *** [.compile.classlist] Error 1
> gmake[7]: Leaving directory
> `/usr/ports/java/jdk15/work/j2se/make/sun/javac/recompile/library'
> gmake[6]: *** [optimized] Error 2
> gmake[6]: Leaving directory
> `/usr/ports/java/jdk15/work/j2se/make/sun/javac/recompile/library'
> gmake[5]: *** [all] Error 1
> gmake[5]: Leaving directory
> `/usr/ports/java/jdk15/work/j2se/make/sun/javac/recompile'
> gmake[4]: *** [all] Error 1
> gmake[4]: Leaving directory `/usr/ports/java/jdk15/work/j2se/make/sun/javac'
> gmake[3]: *** [all] Error 2
> gmake[3]: Leaving directory
> `/usr/ports/java/jdk15/work/j2se/make/java/javac'
> gmake[2]: *** [all] Error 1
> gmake[2]: Leaving directory `/usr/ports/java/jdk15/work/j2se/make/java'
> gmake[1]: *** [all] Error 1
> gmake[1]: Leaving directory `/usr/ports/java/jdk15/work/j2se/make'
> gmake: *** [j2se-build] Error 2
> *** Error code 2
> 
> Stop in /usr/ports/java/jdk15.
> *** Error code 1
> 
> Stop in /usr/ports/java/jdk15.
> 
> I'm not sure where to turn at this point - is there a known "good" JDK
> which works with -CURRENT (on x86)?
I think you might want to add

CFLAGS+=-fno-tree-vrp

to your /etc/make.conf

After doing this, I have successfully built and use:

jdk-1.3.1p9_8       Java Development Kit 1.3
jdk-1.6.0.1p1_5     Java Development Kit 1.6.0

My system is:

sunny:RabbitsDen>uname -a
FreeBSD RabbitsDen.RabbitsLawn.verizon.net 7.0-CURRENT FreeBSD
7.0-CURRENT #0: Sun Sep 30 11:54:51 EDT 2007
root_at_RabbitsDen.RabbitsLawn.verizon.net:/usr/obj/usr/src/sys/TPX60  i386

> 
> Thanks,
> Peter
> 
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
-- 
Alexandre "Sunny" Kovalenko
Received on Wed Oct 10 2007 - 11:45:03 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:19 UTC