Gentoo Archives: gentoo-java

From: Joshua Nichols <nichoj@g.o>
To: Wiktor Wandachowicz <siryes@×××××.com>
Cc: gentoo-java@l.g.o
Subject: Re: [gentoo-java] Re: problems compiling junit
Date: Wed, 12 Apr 2006 13:24:46
Message-Id: 443CFFBC.5000002@gentoo.org
In Reply to: [gentoo-java] Re: problems compiling junit by Wiktor Wandachowicz
1 Wiktor Wandachowicz wrote:
2 > Henrique Ferreiro <henrique.ferreiro@...> writes:
3 >
4 >
5 >> BUILD FAILED
6 >> java.lang.UnsupportedClassVersionError: junit/framework/Test
7 >> (Unsupported major.minor version 49.0)
8 >>
9 >>
10 >
11 > OTOH after some thought, this error simply means that while currently
12 > you have 1.4 system JVM, some libraries were compiled with 1.5 JVM.
13 > This is unfortunate, because Java 1.4 cannot use 1.5 classes (their
14 > internal file format is different).
15 >
16 > Maybe you should look into java-1.5-fixer, previously posted by Joshua
17 > on the same list? (http://article.gmane.org/gmane.linux.gentoo.java/839)
18 >
19 > It's also possible to rebuild the offending packages by hand, but you
20 > will have to find them manually (it may take some time, though...)
21 > The first step is to determine the packages that depends on Java and
22 > then remerge them. I've done it once, so I know it's at least possible :)
23 >
24 > # emerge -avu gentoolkit ### If you don't have equery, that is
25 > # equery depends virtual/jdk | tee ~/java-packages.txt | less
26 >
27 > HTH,
28 > Wiktor
29 >
30 >
31
32 java-1.5-fixer actually is installed now to /usr/bin/java-1.5-fixer.
33
34 As for the problem you're having, it says in the documentation that if
35 you were using 1.5 as a system vm, you will need to run java-1.5-fixer
36 in order to get your system in tip-top-shape.
37
38 Unfortunately, the script isn't flawless, as I previously mentioned on
39 the list [1]. In particular, if something that depends is used by ant is
40 compiled with 1.5, the script will choke up on it. The workaround is to
41 try to figure out what classes are still compiled with 1.5, unmerge them
42 all, then remerge them.
43
44 [1] http://article.gmane.org/gmane.linux.gentoo.java/829
45
46 - Josh
47 --
48 gentoo-java@g.o mailing list