tomcat-users mailing list archives

Site index · List index
Message view
Top
From Sriram N <sriramx_2...@yahoo.com>
Subject Re: Try this (Re: Error: Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath.)
Date Thu, 30 Oct 2003 10:26:36 GMT
```Hi:

I do not have Windows, I use Redhat Linux 9 at home.

I just read  the docs at
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/setup.html

>From what I read  in the third para titled "Java location", I infer the setup
tries to detect the location of the JVM.

Why don't try the following:
1. Uninstall Tomcat.
2. Set the JAVA_HOME environment variable.
3. From a freshly opened command window, issue the command
echo %JAVA_HOME%
You should see the location of JAVA_HOME being displayed.
4. Now run the Tomcat installer, and check if JAVA_HOME was made use of.

The Tomcat installer is written with NSIS (excellent, I use it too). Without
the NSI script in front of me, the only problem/bug I would expect would be
that the installer reads the JVM path from the registry before checking the
JAVA_HOME, and that your JVM folder does not have tools.jar.

-- Sriram

--- Gerald Stampfel <e0125452@student.tuwien.ac.at> wrote:
> Got it ! Thanks!
>
> When starting tomcat from the command line by executing startup.bat, it
> works. But when I am starting it as a windows service, it
> doesn't ! And problem was that I used to start it as a service.
>
> When I start tomcat as a service, the JVM is started with the following
> parameter :
> -Djava.class.path=C:\Programme\jakarta-tomcat\\bin\bootstrap.jar;C:\Programm
> e\jakarta-tomcat\\common\lib\servlet.jar
> I don't see something like %JAVA_HOME%\lib in here. Could that be the
> problem ?
>
> -
> Gerald .
>
> ----- Original Message -----
> From: "Sriram N" <sriramx_2000@yahoo.com>
> To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
> Sent: Thursday, October 30, 2003 3:50 AM
> Subject: Try this (Re: Error: Unable to find a javac compiler;
> com.sun.tools.javac.Main is not on the classpath.)
>
>
> > Hello:
> >
> > I assume that you are using a standard Tomcat download and have not edited
> any
> > startup scripts.
> >
> > 1. Ensure that you have an environment variable called JAVA_HOME that
> points to
> > your Java installation. If JDK installed in c:\Program Files\JDK1.3.1\,
> then
> > the JAVA_HOME environment variable should be set as
> >
> > SET JAVA_HOME="c:\program Files\JDK1.3.1".
> >
> > 2. Now, JAVA_HOME\lib should contain the file tools.jar. This is a
> requirement
> > of the startup scripts.
> >
> > 3. The startup scripts ensure that the CLASSPATH environment variable is
> NOT
> > used by the JVM. All your CLASSPATH settings are therefore not used at
> all.
> >
> > 4. Now try running Tomcat via the batch files from a command prompt. You
> should
> > see the a few messages that state which environment variables are being
> used.
> >
> > -- Sriram
> >
> > --- Gerald Stampfel <e0125452@student.tuwien.ac.at> wrote:
> > > I solved it by copying tools.jar to tomcat/common/lib.
> > >
> > > Dirty workaround, but didn't find any other.
> > >
> > > -
> > > Gerald S.
> > >
> > >
> > > ----- Original Message -----
> > > From: "Gerald Stampfel" <e0125452@student.tuwien.ac.at>
> > > To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
> > > Sent: Wednesday, October 29, 2003 6:18 AM
> > > Subject: Re: Error: Unable to find a javac compiler;
> > > com.sun.tools.javac.Main is not on the classpath.
> > >
> > >
> > > > I am working in a windows environment.
> > > >
> > > > You mean setting my environment variable %classpath% by doing SET
> > > CLASSPATH
> > > > = "..." ?
> > > >
> > > > I have done that and it still doesn't work.
> > > >
> > > > -
> > > > Gerald S.
> > > >
> > > > ----- Original Message -----
> > > > From: "Jay Garala" <jay@electrosoft-inc.com>
> > > > To: "'Tomcat Users List'" <tomcat-user@jakarta.apache.org>
> > > > Sent: Tuesday, October 28, 2003 10:14 PM
> > > > Subject: RE: Error: Unable to find a javac compiler;
> > > > com.sun.tools.javac.Main is not on the classpath.
> > > >
> > > >
> > > > > Make sure u have \$JDK/lib/tools.jar in your classpath
> > > > >
> > > > > -----Original Message-----
> > > > > From: Gerald Stampfel [mailto:e0125452@student.tuwien.ac.at]
> > > > > Sent: Tuesday, October 28, 2003 4:11 PM
> > > > > To: tomcat-user@jakarta.apache.org
> > > > > Subject: Error: Unable to find a javac compiler;
> > > com.sun.tools.javac.Main
> > > > is
> > > > > not on the classpath.
> > > > >
> > > > >
> > > > > Hi folks,
> > > > >
> > > > > i got the following error message:
> > > > >
> > > >
> > >
> > --------------------------------------------------------------------------
> > > > --
> > > > > --
> > > > >
> > > > > 2003-10-28 21:58:08 Info: Compile:
> > > > >
> > > >
> > >
> javaFileName=C:\Programme\jakarta-tomcat\work\Standalone\localhost\jetspeed\
> > > > > /index_jsp.java
> > > > >
> > > > >
> > > >
> > >
> classpath=/C:/Programme/jakarta-tomcat/webapps/jetspeed/WEB-INF/lib/activati
> > > > >
> > > >
> > >
> on.jar;/C:/Programme/jakarta-tomcat/webapps/jetspeed/WEB-INF/lib/castor-0.9.
> > > > >
> > > >
> > >
> 3.jar;/C:/Programme/jakarta-tomcat/webapps/jetspeed/WEB-INF/lib/commons-bean
> > > > >
> > > >
> > >
> utils-1.4.1.jar;/C:/Programme/jakarta-tomcat/webapps/jetspeed/WEB-INF/lib/co
> > > > >
> > > >
> > >
> mmons-collections-2.0.jar;/C:/Programme/jakarta-tomcat/webapps/jetspeed/WEB-
> > >
> > > > >
> > > >
> > >
> INF/lib/commons-configuration-1.0-dev.jar;/C:/Programme/jakarta-tomcat/webap
> > > > >
> > > >
> > >
> ps/jetspeed/WEB-INF/lib/commons-dbcp-1.0-dev-20020806.jar;/C:/Programme/jaka
> > > > >
> > > >
> > >
> rta-tomcat/webapps/jetspeed/WEB-INF/lib/commons-lang-1.0.jar;/C:/Programme/j
> > > > >
> > > >
> > >
> akarta-tomcat/webapps/jetspeed/WEB-INF/lib/commons-logging-1.0.2.jar;/C:/Pro
> > > > >
> > > >
> > >
> gramme/jakarta-tomcat/webapps/jetspeed/WEB-INF/lib/commons-pool-1.0.jar;/C:/
> > > > >
> > > >
> > >
> Programme/jakarta-tomcat/webapps/jetspeed/WEB-INF/lib/ecs-1.4.1.jar;/C:/Prog
> > > > >
> > > >
> > >
> ramme/jakarta-tomcat/webapps/jetspeed/WEB-INF/lib/fulcrum-3.0-b2-dev.jar;/C:
> > > > >
> > > >
> > >
> /Programme/jakarta-tomcat/webapps/jetspeed/WEB-INF/lib/hsqldb.jar;/C:/Progra
> > > > >
> > > >
> > >
> mme/jakarta-tomcat/webapps/jetspeed/WEB-INF/lib/jakarta-oro-2.0.6.jar;/C:/Pr
> > > > >
> > > >
> > >
> ogramme/jakarta-tomcat/webapps/jetspeed/WEB-INF/lib/jakarta-regexp-1.2.jar;/
> > > > >
> > > >
> > >
> C:/Programme/jakarta-tomcat/webapps/jetspeed/WEB-INF/lib/jcs-1.0-dev.jar;/C:
> > > > >
> > > >
> > >
> /Programme/jakarta-tomcat/webapps/jetspeed/WEB-INF/lib/jdbc-se2.0.jar;/C:/Pr
> > > > >
> > > >
> > >
> ogramme/jakarta-tomcat/webapps/jetspeed/WEB-INF/lib/jetspeed-1.4-b4.jar;/C:/
> > > > >
> > > >
> > >
> Programme/jakarta-tomcat/webapps/jetspeed/WEB-INF/lib/log4j-1.2.6.jar;/C:/Pr
> > > > >
> > > >
> > >
> ogramme/jakarta-tomcat/webapps/jetspeed/WEB-INF/lib/mail.jar;/C:/Programme/j
> > > > >
>
=== message truncated ===

__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org