tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kin-Man Chung <Kin-Man.Ch...@Eng.Sun.COM>
Subject Re: Switching javac for jasper 2
Date Fri, 17 May 2002 17:14:12 GMT
See below.

> Date: Thu, 16 May 2002 14:07:36 -0700 (PDT)
> From: costinm@covalent.net
> Subject: Re: Switching javac for jasper 2
> X-X-Sender: costin@costinm.sfo.covalent.net
> To: Tomcat Developers List <tomcat-dev@jakarta.apache.org>, Kin-Man Chung 
<Kin-Man.Chung@Eng.Sun.COM>
> MIME-version: 1.0
> Delivered-to: mailing list tomcat-dev@jakarta.apache.org
> Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm
> X-Antivirus: nagoya (v4198 created Apr 24 2002)
> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
> X-Authentication-warning: costinm.sfo.covalent.net: costin owned process doing 
-bs
> List-Post: <mailto:tomcat-dev@jakarta.apache.org>
> List-Subscribe: <mailto:tomcat-dev-subscribe@jakarta.apache.org>
> List-Unsubscribe: <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> List-Help: <mailto:tomcat-dev-help@jakarta.apache.org>
> List-Id: "Tomcat Developers List" <tomcat-dev.jakarta.apache.org>
> 
> 
> com.sun.tools.javac.Main doesn't seem to be in JDK1.2.x, and that's the 
> target platform, isn't it ? 
> 

I believe for 4.1.x, it should be 1.3.1 and above.  Like I said, 1.2
javac is currently unsupported and deprecated in 1.3 and 1.4, and contain
bugs that are hard to work around.  Can't image people currently using
jdk1.2 wouldn't want to upgrade.

> 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.
> 

I'll look into that.  But even if ant.jar is used programmatically,
eventually it still start another process to invoke javac, right?  Plus
it's  yet another jar to be bundled with tomcat; do we really want
that?

What do others think?


> We already have enough complexity to support jikes.
> 
> Costin
> 

- Kin-man 
> 
> 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>
> 


--
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