Tomcat and java.version

Anthony Green green@redhat.com
Fri Apr 9 17:20:00 GMT 2004


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.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /