tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cost...@covalent.net
Subject Re: Switching javac for jasper 2
Date Thu, 16 May 2002 21:07:36 GMT

com.sun.tools.javac.Main doesn't seem to be in JDK1.2.x, and that's the 
target platform, isn't it ? 

I think the best solution for javac is to just bundle ant.jar and
use it programmatically ( i.e. new Javac(), etc ). The introspection
and hacks required to support multiple compilers are just too 
ugly  - and they already have good solutions in ant.

We already have enough complexity to support jikes.

Costin


On Thu, 16 May 2002, Kin-Man Chung wrote:

> Tomcat has been using sun.tools.javac.Main as the default java compiler
> for compiling the java files generated by Jasper.  This compiler is
> essentially a JDK1.2 compiler, current deprecated and unsupported.
> The warning message "Note: sun.tools.javac.Main has been deprecated"
> is probably familiar to a lot of people.
> 
> The compiler to use is com.sun.tools.javac.Main.  The only thing that
> prevented us from switching over to this one is the fact that it does
> not allow a PrintWriter to be specified for error messages that it
> may produce, which essentially force tomcat to synchronize all
> compilation processes, a big performance hit.
> 
> I believe that J2sdk1.4.1, currently targetted for FCS in fall 2002,
> will provide a javac.Main which allows us to specify a PrintWriter,
> essentially removing the need for synchronizing the compilation.  We
> definitely will use that when it becomes available.
> 
> However, I recently runs into problem with sun.tools.javac.Main which
> surfaces when a jsp page gets large.  Sometimes it produces bogus
> errors, and somteitmes it even produces bad class files that cannot
> be loaded by VM.  I am contemplating switching over to using
> com.sun.tools.javac.Main now, for 4.1 (jasper2).  If there are objections,
> please let me know.
> 
> BTW, anyone know the best way to capture javac error messages written to
> standard err stream?  I want to avoid calling Runtime.getRuntime().exec
> if there is a way.
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>
> 
> 


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message