[rfc][icedtea-web] Java 7 bump
Andrew Azores
aazores at redhat.com
Thu Apr 10 14:46:14 UTC 2014
On 04/08/2014 09:52 AM, Andrew Azores wrote:
> On 04/07/2014 05:39 PM, Omair Majid wrote:
>> * Andrew Azores <aazores at redhat.com> [2014-04-07 17:24]:
>>> Here's my attempt at getting the build system properly checking for
>>> and working with Java 7.
>> Previously, a 6 was the a minimal version, but icedtea-web would
>> build/work with 7 too. The mirror of that would be requiring 7 but also
>> working with 8. But I don't think this patch works with just 8. Am I
>> mistaken?
>
> I have both 7 and 8 (and 5 due to GCJ) installed on my machine here
> and the version check seemed to work properly in each case, switching
> between them with system-switch-java since the first location checked
> is now set by alternatives. With 5 it complained and failed, and with
> 7 or 8 it completed normally. So as far as I can tell, I think it works.
>
>>
>>> Note that (1) almost all of what I know about autotools was learned
>>> today
>> This is amazing stuff!
>
> Thanks :)
>
>>
>>> - for dir in /usr/lib/jvm/java-openjdk /usr/lib/jvm/icedtea6 \
>>> - /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/openjdk \
>>> - /usr/lib/jvm/java-icedtea /usr/lib/jvm/java-gcj
>>> /usr/lib/jvm/gcj-jdk \
>>> - /usr/lib/jvm/cacao ; do
>>> + for dir in /etc/alternatives/java_sdk \
>>> + /usr/lib/jvm/java-openjdk \
>>> + /usr/lib/jvm/java-1.7.0-openjdk \
>>> + /usr/lib/jvm/openjdk \
>>> + /usr/lib/jvm/java-icedtea \
>>> + /usr/lib/jvm/cacao ; do
>> Wouldn't it make sense to add '/usr/lib/jvm/icedtea7' and
>> '/usr/lib/jvm/java-7-openjdk' to the paths too? Or have those
>> distributions changed the paths?
>>
>> I can't make up my mind whether we should try the well-known 7 or 8
>> locations. The default location may be 6, but it may also be the 7 or 8
>> VM the user wants to use.
>>
>>> AC_PATH_PROG(JAVA, "gij")
>> Does 'gij' work? That's a 1.5 VM, right? Maybe this needs more cruft
>> removed.
>
> I'm sure there's a lot more cruft I've missed.
>
>>
>>> - AC_MSG_ERROR("A 1.5-compatible Java VM is required.")
>>> + AC_MSG_ERROR("A 1.7-compatible Java VM is required.")
>> 1.7 or newer, right?
>
> Well, yea. The 1.8 VM can still be called 1.7-compatible though, can't
> it?
>
>>
>>> JAVA_VERSION=`$JAVA -version 2>&1 | sed -n
>>> '1s/@<:@^"@:>@*"\(.*\)"$/\1/p'`
>>> + AC_MSG_RESULT($JAVA_VERSION)
>>> HAVE_JAVA7=`echo $JAVA_VERSION | awk '{if ($(0) >= 1.7) print
>>> "yes"}'`
>>> - if ! test -z "$HAVE_JAVA7" ; then
>>> - VERSION_DEFS='-DHAVE_JAVA7'
>>> + HAVE_JAVA8=`echo $JAVA_VERSION | awk '{if ($(0) >= 1.8) print
>>> "yes"}'`
>>> + if test -z "$HAVE_JAVA7"; then
>> This test is for just 7. I take it you meant to test 8 here too?
>>
>> Thanks,
>> Omair
>>
>
> It tests and requires that at least 7 is in use, otherwise it fails
> out. If 8 or higher is in use, then it does the same trick with
> -DHAVE_JAVA8 so that the plugin can add 1.8 to its MIME types. Using
> system-switch-java and reconfiguring/building, then checking
> about:plugins in Firefox does show that when using 8, an additional
> MIME type for it is added, just as before with 6 vs 7.
>
> Thanks,
>
Ping - buildbot is still broken without this right now, and it's also
blocking my patch updating PolicyEditor to use Swing generics etc.
Thanks,
--
Andrew A
More information about the distro-pkg-dev
mailing list