Installing Tomcat (tomcat6) on Suse 11.1

On SuSE 11.1, "zypper search java" indicated that I don't have any JRE or JDK installed.

"zypper install tomcat6" will install tomcat and will also install java-1_5_0-sun.

Next, did "sudo /sbin/yast2", then from System, System Services, started tomcat6. yast2 indicated a success (note: it's fake).

Pointed my browser to localhost:8080 (the default port for tomcat), nothing was there.

"telnet localhost 8080" indicated that nothing is listenning there.

Looked at the log file /usr/share/tomcat6/logs/catalina.out, which had an entry saying:

"Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file"

A web search indicated that this might be because there is an older (incompatible) version of the JRE installed.

"zypper install openjdk" did the trick. It installed java-1_6_0-openjdk, then tomcat6 was successfully restarted from yast2.

Now, localhost:8080 works.