Michael Fuhrman wrote:

> Hi Dan,
>
> Actually, I was trying to figure out what the stack trace was trying to tell
> me.  Thanks for that tid bit.  And, actually I was including \java\lib in
> the class path, but for some strange reason the demo doesn't like it!  ...

Including "\java\lib" (assuming that this is the "lib" directory of your JDK)
is not going to work anyway.  If the classes you want are in a JAR file, you
need to include the pathname of the JAR file instead, something like:

    \java\lib\tools.jar


>
> But for the interim, I copied the tools.jar file to the subdirectory where
> the demo is running, and included it's name in the class path for the batch
> files there.  Everything seemed to work fine after that.
>
> Michael J. Fuhrman
> Reliable Business Computers
> http://www.creliable.com/
>

If you included the full pathname to the tools.jar file, it doesn't matter
where in your file system hierarchy the file is found, as long as there are no
operating system restrictions on your ability to read the file.

In a Java2 environment, you have another choice -- make the "tools.jar" file
look like a standard extension.  You do this by putting a copy of it into the
....\jre\lib\ext subdirectory of your JDK installation.  Any JAR file found
here is automatically added to the system class path at startup time, so you
never have to mess with the CLASSPATH environment variable ever again.  This is
also a dandy place to put things like the "servlet.jar" file that contains the
definitions of all the javax.servlet.* classes, so you can compile servlets
without getting "no class definition found" errors.

Craig McClanahan


>
> -----Original Message-----
> From: Daniel Lopez [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 28, 1999 8:24 AM
> To: Michael Fuhrman; JSP Interest List
> Subject: Re: Errors
>
> Hi Michael,
>
> Java Server Pages engine do compile the pages and create the .class
> files, so I bet you are using JDK 1.2 but you haven't included the
> tools.jar file in your classapth.
> If you read the stack trace, you'll see that it's not finding the "javac
> tool" ;).
>
> I hope this helps,
> Dan
> -------------------------------------------
> Daniel Lopez Janariz ([EMAIL PROTECTED])
> Object Systems Design Engineer
> Computer Center
> Balearic Islands University
> -------------------------------------------
>
> Michael Fuhrman wrote:
> >
> > Hello, Again,
> >
> > Found that error I was having.
> >
> > I wasn't paying attention, the Servlets were working.  Not the Java Server
> > Pages.
> >
> > Suggestions would be welcome.
> >
> > Michael J. Fuhrman
> > Reliable Business Computers
> > http://www.creliable.com/
> >
> > Unhandled error! You might want to consider having an error page to report
> > such errors more gracefully
> >
> > java.lang.NoClassDefFoundError: sun/tools/javac/Main
> >         at com.sun.jsp.compiler.Main.compile(Main.java:194)
> >         at com.sun.jsp.runtime.JspLoader.loadJSP(JspLoader.java:114)
> >         at
> >
> com.sun.jsp.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.
> > java:69)
> >         at
> >
> com.sun.jsp.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:77)
> >         at
> > com.sun.jsp.runtime.JspServlet.serviceJspFile(JspServlet.java:125)
> >         at com.sun.jsp.runtime.JspServlet.service(JspServlet.java:152)
> >         at javax.servlet.http.HttpServlet.service(Compiled Code)
> >         at com.sun.web.core.ServletWrapper.handleRequest(Compiled Code)
> >         at com.sun.web.core.Context.handleRequest(Compiled Code)
> >         at com.sun.web.server.ConnectionHandler.run(Compiled Code)
> >
> >
> ===========================================================================
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> > of the message "signoff JSP-INTEREST".  For general help, send email to
> > [EMAIL PROTECTED] and include in the body of the message "help".
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff JSP-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to