[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Please help: JServ logging not solved yet

Andreas Tille wrote:

> public class LogWriter extends PrintStream
> {
>   public static void SetLog(GenericServlet gs) {
>     System.setErr(gs.log);
>   }
> }
> May be you immediately see the problem why the compiler fails but I'm
> not experienced enough tocope with the following error message:
> CLASSPATH=".:/usr/lib/jdk1.1/lib/classes.zip:/usr/share/java/ApacheJServ.jar:/usr/share/java/servlet-2.0.jar" jikes -g LogWriter.java
> Found 3 semantic errors compiling "LogWriter.java":
>      5. public class LogWriter extends PrintStream
>                      <--------------------------->
> *** Error: No match was found for constructor "PrintStream()".

Class PrintStream have only constructors: PrintStream(OutputStream out)
and PrintStream(OutputStream out, boolean autoFlush).  You should write
a constructor in LogWriter that call one of them.
Edouard G. Parmelan

Reply to: