This is the mail archive of the rhug-rhats@sources.redhat.com mailing list for the RHUG project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Tomcat and java.version


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 <green@redhat.com>
Red Hat, Inc.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]