Re: [PATCH] about kjc

2001-12-05 Thread Takashi Okamoto

At Sun, 2 Dec 2001 15:19:05 -0800 (PST),
Craig R. McClanahan <[EMAIL PROTECTED]> wrote:
> I looked at this option a little bit a while back, and have only one
> concern -- multiple threads trying to compile at the same time.  Ant tasks
> generally assume that they don't need to worry about thread safety issues,
> so we need to review this code carefully. (Of course, this issue applies
> even more so to the "new" Javac entry point in 1.4 -- it writes error
> messages to System.out).

Well, I refered org.apache.tools.ant.taskdefs.compilers.Javac13.java

Class c = Class.forName ("com.sun.tools.javac.Main");
Object compiler = c.newInstance ();
Method compile = c.getMethod ("compile",
new Class [] {(new String [] {}).getClass ()});
int result = ((Integer) compile.invoke
  (compiler, new Object[] {cmd.getArguments()})) .intVal
ue ();

So, above code shows that compiler output messages to System.out. Some
of other compilers are same as Jikes13.java. They are thread-unsafe.
They should be locked.

Takashi Okamoto

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [PATCH] about kjc

2001-12-02 Thread Craig R. McClanahan

On Sun, 2 Dec 2001, Takashi Okamoto wrote:

> Date: Sun, 02 Dec 2001 09:19:37 +0900
> From: Takashi Okamoto <[EMAIL PROTECTED]>
> Reply-To: Tomcat Developers List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Cc: Tomcat Developers List <[EMAIL PROTECTED]>
> Subject: Re: [PATCH] about kjc
>
> Hi, Costin.
>
> At Sat, 1 Dec 2001 09:24:59 -0800 (PST),
> <[EMAIL PROTECTED]> wrote:
> > +1 for the patch, but there's something that bothers me - we are starting
> > to duplicate what's already present in ant. Next we'll have gcj support,
> > etc.
> > How difficult would it be to add an 'ant' compiler adapter, that will just
> > use the ant  task ?
>
> Of cource, using ant is better:) It's good idea.
> It seems not so difficult. You can use Javac or CompilerAdapterFactory
> (and Compiler Adapter) class for it.
>

I looked at this option a little bit a while back, and have only one
concern -- multiple threads trying to compile at the same time.  Ant tasks
generally assume that they don't need to worry about thread safety issues,
so we need to review this code carefully.  (Of course, this issue applies
even more so to the "new" Javac entry point in 1.4 -- it writes error
messages to System.out).

> > And also use the same ant mechansim, a global property - it's
> > possible other tools will need a compiler ( what is cocoon doing ? )
> > ?
>
> I don't know recent Cocoon. But cocoon 1.8.x was using just tomcat's
> JavaCompiler;)
>
> > This would also allow to automatically compile servlets ( the same
> > as jsps are compiled ),
>
> Resin has it already. It's very useful:)
>
> thanks.
> 
> Takashi Okamoto
>

Craig McClanahan


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: [PATCH] about kjc

2001-12-02 Thread Peter Donald

On Sun, 2 Dec 2001 08:03, Jon Stevens wrote:
> on 12/1/01 10:08 AM, "Remy Maucherat" <[EMAIL PROTECTED]> wrote:
> >> Hi, tomcat users and developrs!
> >>
> >> /* I have post this patch twice. This is third time. */
> >>
> >> Do you know kjc which is one of the completely opensource Java
> >> compiler? If not, you can see detail at http://www.dms.at/kopi.
> >>
> >> Accoding to Edouard G. Parmelan's report
> >> (http://rpmfind.net/tools/Kaffe/messages/1291.html), KJC HAVE BEATEN
> >> SUN'S JAVA COMPILER since version 1.5 about JLS compatibility. It was
> >> a grate news for Java open source community;)
> >>
> >> I and teik-san (san means Mr. in Japanese) wrote two kjc plugin for
> >> tomcat. One is for 3.3.x, and the other is for 4.0.x. If you take kjc
> >> plugin, it's good advertisement and help for kjc. Do you respect
> >> opensource? If so, could you take them?
> >>
> >>
> >> BTW, kjc is distributed under GPL. But you can take these patch in
> >> legal. Because you don't need to include kjc in tomcat. When you want to
> >> use kjc, only then you have to include it. In the fact, I wrote kjc
> >> plugin for Ant and it's really in it. So, you can also use kjc with
> >> Ant fine:)
> >
> > +1 for this patch as it is legal since it uses reflection.
> >
> > Remy
>
> I thought that using reflection to work with GPL code was still considered
> illegal by the FSF.

Depends on exactly it is used from my understanding. If you use reflection 
but still directly integrate with the GPL work such that there is no chance 
that the GPL layer could be replaced with something else or your code can not 
run in GPL free mode then it is considered no different from directly linking 
against it.

Note that if you use the "main()" interface that is considered okay last time 
I checked. However if you need to bind against the innards of the compiler 
then one option is to do the following. Create an interface layer and place 
it under a GPL compatible license (MIT, BSDL or whatever) and program against 
that interface. Then add some code to GPL work so that it implements 
interface.

-- 
Cheers,

Pete

---
Murphy's law - "Anything that can go wrong, will." 
(Actually, this is Finagle's law, which in itself 
shows that Finagle was right.)
---

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [PATCH] about kjc

2001-12-01 Thread Takashi Okamoto

Hi, Costin.

At Sat, 1 Dec 2001 09:24:59 -0800 (PST),
<[EMAIL PROTECTED]> wrote:
> +1 for the patch, but there's something that bothers me - we are starting
> to duplicate what's already present in ant. Next we'll have gcj support,
> etc.
> How difficult would it be to add an 'ant' compiler adapter, that will just
> use the ant  task ? 

Of cource, using ant is better:) It's good idea.
It seems not so difficult. You can use Javac or CompilerAdapterFactory
(and Compiler Adapter) class for it.

> And also use the same ant mechansim, a global property - it's
> possible other tools will need a compiler ( what is cocoon doing ? )
> ?

I don't know recent Cocoon. But cocoon 1.8.x was using just tomcat's
JavaCompiler;)

> This would also allow to automatically compile servlets ( the same
> as jsps are compiled ),

Resin has it already. It's very useful:)

thanks.

Takashi Okamoto

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [PATCH] about kjc

2001-12-01 Thread Remy Maucherat

> On Sat, 1 Dec 2001, Jon Stevens wrote:
>
> > > +1 for this patch as it is legal since it uses reflection.
> > >
> > > Remy
> >
> > I thought that using reflection to work with GPL code was still
considered
> > illegal by the FSF.
>
> As long ASF/jakarta doesn't have a list of 'accepted licences' that we can
> include/bundle with our code, and most jakarta projects already
> depend/bundle lots of proprietary code, I don't see why this patch would
> be a problem. It doesn't require us to distribute GPL code.

Yes, I don't really see any problem here. If the ASF feels it's still not
OK, then I'll remove the file (it's fully independent from the rest).

Remy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [PATCH] about kjc

2001-12-01 Thread cmanolache

On Sat, 1 Dec 2001, Jon Stevens wrote:

> > +1 for this patch as it is legal since it uses reflection.
> >
> > Remy
>
> I thought that using reflection to work with GPL code was still considered
> illegal by the FSF.

As long ASF/jakarta doesn't have a list of 'accepted licences' that we can
include/bundle with our code, and most jakarta projects already
depend/bundle lots of proprietary code, I don't see why this patch would
be a problem. It doesn't require us to distribute GPL code.


Costin



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [PATCH] about kjc

2001-12-01 Thread Jon Stevens

on 12/1/01 10:08 AM, "Remy Maucherat" <[EMAIL PROTECTED]> wrote:

>> Hi, tomcat users and developrs!
>> 
>> /* I have post this patch twice. This is third time. */
>> 
>> Do you know kjc which is one of the completely opensource Java
>> compiler? If not, you can see detail at http://www.dms.at/kopi.
>> 
>> Accoding to Edouard G. Parmelan's report
>> (http://rpmfind.net/tools/Kaffe/messages/1291.html), KJC HAVE BEATEN
>> SUN'S JAVA COMPILER since version 1.5 about JLS compatibility. It was
>> a grate news for Java open source community;)
>> 
>> I and teik-san (san means Mr. in Japanese) wrote two kjc plugin for
>> tomcat. One is for 3.3.x, and the other is for 4.0.x. If you take kjc
>> plugin, it's good advertisement and help for kjc. Do you respect
>> opensource? If so, could you take them?
>> 
>> 
>> BTW, kjc is distributed under GPL. But you can take these patch in
>> legal. Because you don't need to include kjc in tomcat. When you want to
>> use kjc, only then you have to include it. In the fact, I wrote kjc
>> plugin for Ant and it's really in it. So, you can also use kjc with
>> Ant fine:)
> 
> +1 for this patch as it is legal since it uses reflection.
> 
> Remy

I thought that using reflection to work with GPL code was still considered
illegal by the FSF.

-jon


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [PATCH] about kjc

2001-12-01 Thread Remy Maucherat

> Hi, tomcat users and developrs!
> 
> /* I have post this patch twice. This is third time. */
> 
> Do you know kjc which is one of the completely opensource Java
> compiler? If not, you can see detail at http://www.dms.at/kopi.
> 
> Accoding to Edouard G. Parmelan's report
> (http://rpmfind.net/tools/Kaffe/messages/1291.html), KJC HAVE BEATEN
> SUN'S JAVA COMPILER since version 1.5 about JLS compatibility. It was
> a grate news for Java open source community;)
> 
> I and teik-san (san means Mr. in Japanese) wrote two kjc plugin for
> tomcat. One is for 3.3.x, and the other is for 4.0.x. If you take kjc
> plugin, it's good advertisement and help for kjc. Do you respect
> opensource? If so, could you take them? 
> 
> 
> BTW, kjc is distributed under GPL. But you can take these patch in
> legal. Because you don't need to include kjc in tomcat. When you want to
> use kjc, only then you have to include it. In the fact, I wrote kjc
> plugin for Ant and it's really in it. So, you can also use kjc with
> Ant fine:)

+1 for this patch as it is legal since it uses reflection.

Remy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [PATCH] about kjc

2001-12-01 Thread costinm

Hi Takashi-san,

+1 for the patch, but there's something that bothers me - we are starting
to duplicate what's already present in ant. Next we'll have gcj support,
etc.

How difficult would it be to add an 'ant' compiler adapter, that will just
use the ant  task ? And also use the same ant mechansim, a global
property - it's possible other tools will need a compiler ( what is cocoon
doing ? ) ? Given the current ant dependecy checking ( that use class
bytecode to detect dependencies ) we could simplify and generalize most of
what's ugly in jasper. This would also allow to automatically compile
servlets ( the same as jsps are compiled ), and even to automatically
recompile a webapp ( that has a build.xml in WEB-INF ).


Costin


On Sat, 1 Dec 2001, Takashi Okamoto wrote:

> Hi, tomcat users and developrs!
>
> /* I have post this patch twice. This is third time. */
>
> Do you know kjc which is one of the completely opensource Java
> compiler? If not, you can see detail at http://www.dms.at/kopi.
>
> Accoding to Edouard G. Parmelan's report
> (http://rpmfind.net/tools/Kaffe/messages/1291.html), KJC HAVE BEATEN
> SUN'S JAVA COMPILER since version 1.5 about JLS compatibility. It was
> a grate news for Java open source community;)
>
> I and teik-san (san means Mr. in Japanese) wrote two kjc plugin for
> tomcat. One is for 3.3.x, and the other is for 4.0.x. If you take kjc
> plugin, it's good advertisement and help for kjc. Do you respect
> opensource? If so, could you take them?
>
>
> BTW, kjc is distributed under GPL. But you can take these patch in
> legal. Because you don't need to include kjc in tomcat. When you want to
> use kjc, only then you have to include it. In the fact, I wrote kjc
> plugin for Ant and it's really in it. So, you can also use kjc with
> Ant fine:)
>
> PS.
> usage for tomcat 4.0.x:
> download kjc.jar from http://www.dms.at/kopi and include it in
> common/lib.
>
> add specify jspCompilerPlugin at web.xml. For examples.
>
>   
> jsp
> org.apache.jasper.servlet.JspServlet
> 
>   logVerbosityLevel
>   WARNING
> 
> 
>   jspCompilerPlugin
>   org.apache.jasper.compiler.KjcJavaCompiler
> 
> 3
>   
>
>
> Cheers for opensource!!
> -
> Takashi OkamotoDebian Project: http://www.debian.org/
> [EMAIL PROTECTED]Ja-Jakarta Project: http://www.ingrid.org/jajakarta/
>GnuPG: 8B37 1FE6 76B2 7BA6 D59A  9BF7 E7F4 46C8 5293 6E17
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




[PATCH] about kjc

2001-12-01 Thread Takashi Okamoto

Hi, tomcat users and developrs!

/* I have post this patch twice. This is third time. */

Do you know kjc which is one of the completely opensource Java
compiler? If not, you can see detail at http://www.dms.at/kopi.

Accoding to Edouard G. Parmelan's report
(http://rpmfind.net/tools/Kaffe/messages/1291.html), KJC HAVE BEATEN
SUN'S JAVA COMPILER since version 1.5 about JLS compatibility. It was
a grate news for Java open source community;)

I and teik-san (san means Mr. in Japanese) wrote two kjc plugin for
tomcat. One is for 3.3.x, and the other is for 4.0.x. If you take kjc
plugin, it's good advertisement and help for kjc. Do you respect
opensource? If so, could you take them? 


BTW, kjc is distributed under GPL. But you can take these patch in
legal. Because you don't need to include kjc in tomcat. When you want to
use kjc, only then you have to include it. In the fact, I wrote kjc
plugin for Ant and it's really in it. So, you can also use kjc with
Ant fine:)

PS.
usage for tomcat 4.0.x:
download kjc.jar from http://www.dms.at/kopi and include it in
common/lib. 

add specify jspCompilerPlugin at web.xml. For examples.

  
jsp
org.apache.jasper.servlet.JspServlet

  logVerbosityLevel
  WARNING


  jspCompilerPlugin
  org.apache.jasper.compiler.KjcJavaCompiler

3
  


Cheers for opensource!!
-
Takashi OkamotoDebian Project: http://www.debian.org/
[EMAIL PROTECTED]Ja-Jakarta Project: http://www.ingrid.org/jajakarta/
   GnuPG: 8B37 1FE6 76B2 7BA6 D59A  9BF7 E7F4 46C8 5293 6E17




KjcJavaCompiler.java.3.3
Description: Binary data


KjcJavaCompiler.java.4.0
Description: Binary data





--
To unsubscribe, e-mail:   
For additional commands, e-mail: