From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26896 invoked by alias); 9 Apr 2004 17:20:37 -0000 Mailing-List: contact rhug-rhats-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: rhug-rhats-owner@sources.redhat.com Received: (qmail 26729 invoked from network); 9 Apr 2004 17:20:37 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 9 Apr 2004 17:20:37 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i39HKZME003240 for ; Fri, 9 Apr 2004 13:20:36 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i39HJXM11948; Fri, 9 Apr 2004 13:19:34 -0400 Received: from escape (vpn26-2.sfbay.redhat.com [172.16.26.2]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i39HJWC02544; Fri, 9 Apr 2004 10:19:32 -0700 Subject: Tomcat and java.version From: Anthony Green To: gbenson@redhat.com, rhug-rhats@sources.redhat.com, java@gcc.gnu.org Content-Type: text/plain Organization: Red Hat, Inc. Message-Id: <1081531170.4634.56.camel@escape> Mime-Version: 1.0 Date: Fri, 09 Apr 2004 17:20:00 -0000 Content-Transfer-Encoding: 7bit X-RedHat-Spam-Score: 0 X-SW-Source: 2004-04/txt/msg00001.txt.bz2 gcj's java.version system property currently mirrors the GCC release version. This can be surprising to some software that examines java.version. In some cases it causes fatal errors. For instance, the jakarta commons-lang package tries to convert java.version to a floating point number, but values like "3.5-tree-ssa" really mess it up. Below is a patch to /etc/init.d/tomcat to work around the problem. This was necessary in order use various jsp tag libraries with gcj. But this raises the question of whether or not we're doing ourselves any favours by making java.version == the GCC version. Should we really be using 1.2, 1.4, etc..? AG *** /etc/init.d/tomcat~ 2003-11-12 03:48:16.000000000 -0800 --- /etc/init.d/tomcat 2004-04-09 09:47:29.000000000 -0700 *************** *** 141,147 **** [ "${BOOTUP:-}" = "verbose" -a -z "$LSB" ] && echo -n " $prog" # And start it up. ! $nice initlog $INITLOG_ARGS -c "$cmd" RETVAL=$? if [ $RETVAL = 0 ]; then success $"$prog startup" --- 141,147 ---- [ "${BOOTUP:-}" = "verbose" -a -z "$LSB" ] && echo -n " $prog" # And start it up. ! GCJ_PROPERTIES="java.version=1.2" $nice initlog $INITLOG_ARGS -c "$cmd" RETVAL=$? if [ $RETVAL = 0 ]; then success $"$prog startup" -- Anthony Green Red Hat, Inc.