From stefanl@iii.com Mon Sep 29 18:46:09 2003 Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 18893 invoked from network); 29 Sep 2003 18:46:09 -0000 Received: from unknown (HELO vega.iii.com) (192.33.187.51) by daedalus.apache.org with SMTP; 29 Sep 2003 18:46:09 -0000 Received: from molly.iii.com (upgrade [192.33.187.250]) by vega.iii.com (8.9.3/8.9.1) with ESMTP id LAA31649 for ; Mon, 29 Sep 2003 11:46:13 -0700 (PDT) Received: from pcs387 (pcs140 [205.227.90.210]) by molly.iii.com (8.9.3/8.9.1) with SMTP id LAA24027 for ; Mon, 29 Sep 2003 11:46:13 -0700 (PDT) From: "Stefan Lasiewski" To: "'Tomcat Users List'" Subject: RE: Running tomcat with JRE + tools.jar Date: Mon, 29 Sep 2003 11:47:40 -0700 Message-ID: <002801c386ba$293b7f70$d25ae3cd@pcs387> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 In-Reply-To: <3F6B9733.4010504@sendmail.com> Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > -----Original Message----- > From: Ted Weatherly [mailto:ted@sendmail.com] > Sent: Friday, September 19, 2003 4:54 PM > To: tomcat-user@jakarta.apache.org > Subject: Running tomcat with JRE + tools.jar Hello from around the corner! > I know you're supposed to run tomcat using the SDK but I want > to avoid > that if possible. Instead, I am trying to run tomcat 4.1 using the > JRE...and I still want the ability to compile servlets. I read > somewhere that you can accomplish this by copying tools.jar to the > $jre_home/lib directory. I tried this and I get: It is possible. You are on the right track. You also need to modify the startup scripts a bit. See below: > > ./startup.sh > The JAVA_HOME environment variable is not defined correctly > This environment variable is needed to run this program If you search on this error message, you will see that it comes from setclasspath.sh : % grep "The JAVA_HOME environment variable is not defined correctly" * setclasspath.sh: echo "The JAVA_HOME environment variable is not defined correctly" setclasspath.sh: echo "The JAVA_HOME environment variable is not defined correctly" setclasspath.sh contains the following code: if [ ! -r "$JAVA_HOME"/bin/java -o ! -r "$JAVA_HOME"/bin/jdb -o ! -r "$JAVA_HO ME"/bin/javac ]; then echo "The JAVA_HOME environment variable is not defined correctly" Neither javac or jdb are included with the JRE. You need to modify this expression so that it only looks for lib/tools.jar . I don't think the jdb is mandatory unless you need to run in debug mode. And then, you need to make sure the CLASSPATH includes the path to tools.jar . I forget exactly how to do that. > My JAVA_HOME is set to the base of my JRE (/usr/java/j2re1.4.2_01/). > That path is valid. Tomcat starts if I set JAVA_HOME to the > base of my SDK. That's because Tomcat can find the jdb & the javac, because they are under your SDK. > What do I have to do to get Tomcat to run with the JRE? Is > there a doc > for this? > > -Ted > > PS> You can redistribute the SDK if it is bundled with your software, > right? The legal agreement on java.sun.com seems to confirm > this ("The > program [SDK] must add significant and primary functionality to the > software."). I've read in a few forums, though, that you can only > redistribute the JRE. Perhaps Sun's policy has changed? Read the license included with the JDK. It will specifically state which files can be redistributed. -= Stefan