Hi,
Make sure you compile everything with Java 1.5 or javac -target 1.5. That wil
run in java 1.5 and 1.6.
Ronald.
Op woensdag, 24 juni 2009 20:54 schreef Ken Bowen :>
Hi all,
I failed at searching for this, even though I know it's been answered:
Setting: Tomcat 6.0_20; Mac OS X 10.5.7;
I've been normally running against java 1.5.0_19, but I tried to
install a war which is throwing
.UnsupportedClassVersionError: Bad version number in .class file
when it tries to load. So clearly I need to run it under java 1.6,
which is installed, and I know that moving to 1.6 is a good thing.
However, for a while I'm going to need to switch back and forth
between 1.5 and 1.6, because at least one customer is stuck at 1.5 for
the present. I made a copy of tomcat's bin/startup.sh, renamed it
sup16.sh, and added these two lines at the top:
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
export JAVA_HOME
This appears to work well enough -- the new war starts and does it's
basic thing ok, and when I want to switch up to 1.6 in general, I
could do the same thing creating a sup15.sh. So I really only have
two questions:
1) Are there hidden problems lurking with doing things this way?
2) Is there a better way of being able to switch back & forth?
Thanks in advance,
Ken
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org