public inbox for rhug-rhats@sourceware.org
 help / color / mirror / Atom feed
* Tomcat and java.version
@ 2004-04-09 17:20 Anthony Green
  2004-04-09 17:30 ` Andrew Pinski
  0 siblings, 1 reply; 2+ messages in thread
From: Anthony Green @ 2004-04-09 17:20 UTC (permalink / raw)
  To: gbenson, rhug-rhats, java

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Tomcat and java.version
  2004-04-09 17:20 Tomcat and java.version Anthony Green
@ 2004-04-09 17:30 ` Andrew Pinski
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Pinski @ 2004-04-09 17:30 UTC (permalink / raw)
  To: Anthony Green; +Cc: gbenson, rhug-rhats, Andrew Pinski, java


On Apr 9, 2004, at 13:19, Anthony Green wrote:

> 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.


Looking at <http://java.sun.com/j2se/versioning_naming.html>, it looks 
like
jakarta is wrong here, in fact it was not wrong, a beta from Sun would 
not be able
to run jakarta at all.

▪ 	A separator is always used between different parts of the string so 
that ordering can be determined programmically. (For example, a version 
string of "1.3.1beta" is not acceptable. A version string of 
"1.3.1-beta" is acceptable.)


Thanks,
Andrew Pinski

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-04-09 17:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-09 17:20 Tomcat and java.version Anthony Green
2004-04-09 17:30 ` Andrew Pinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).