Conflicts between multiple Tomcat versions when multiple JDK versions are installed

Source: Internet
Author: User

One server has two JDK, one is jdk1.4 and the other is jdk1.6.

Tomcat versions: Tomcat and tomcat. All of them are installed on one server. This conflict has been a headache for a long time.

Tomcat5.0 matches jdk1.4,

Tomcat6.0 matches jdk1.6,

1. First, specify the JDK matching Tomcat

The two Tomcat Start port numbers are different.

Secondly, the JDK versions that match the two Tomcat servers are naturally different,

However, the system defaults to a later version of JDK. This is a problem with Tomcat 5. Tomcat 5 only supports JDK, so we need to specify the JDK path that Tomcat matches.

In the bin folder under the tomcat installation directory

Catalina. bat

Setclasspath. bat

Open the two files in notepad and add one sentence to each file.

Set java_home = JDK path (added to both Tomcat servers)

You can add the matching path of Tomcat.

2. However, the project in earlier versions of Tomcat seems to be okay, but some features are still available after the server is started. After checking for a long time, we still have the conflict between jdk1.6 and jdk1.4.

Tomcat5.0 earlier versions must be started before tomcat6.0 starts

Therefore, you must set the server startup sequence. Before you enable the Tomcat service

1. Open the registry and set the service startup sequence. HKEY_LOCAL_MACHINE-> system-> services-> CurrentControlSet creates a new multi-string value named dependonservice,

Value:

Tomcat5.0

Tomcat6.0

In this way

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.