You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Christopher Oliver <re...@verizon.net> on 2002/12/15 00:37:39 UTC

Re: Compiling with Servlet spec 2.3 classloading

I've also had to try to solve the embedded compiling problem (for other 
reasons) and I've also tried to use Pizza. Unfortunately, Pizza is very 
poor quality code and has severe limitations that made it unusable for 
me. Instead I've used the eclipse.org Java Development Tools compiler 
(which is excellent) to implement a simple embeddable compiler API. I've 
placed a copy of the source code on my ftp server if anyone is 
interested in using it (ftp://ftp.primaryinterface.com/pub/javacAPI). 
There is no license for the code I've written. The API itself has no 
dependencies on other software. And the provided implementation has no 
dependencies other than on eclipse (don't know if that is a problem for 
Apache projects...).

The provided zip file contains source, compiled code, javadocs, and  a 
couple of example programs: one that simulates the javac command line 
compiler, and another that demonstrates compiling source code in memory 
and dynamically loading the resulting classes.

Regards,

Chris



Stefano Mazzocchi wrote:

> jakob.dalsgaard@neupart.dk wrote:
>
>> Gee, now I've been lurking about the cocoon mailing lists for years, 
>> posting small and easily ignorable questions - and now this reply; 
>> it's probably the first time I see: "You are my man, really. I love 
>> this." on this mailing list... thanks Stefano - nice to know that I 
>> might be on the right path.
>
>
> Hey, you saved me from writing a java compiler, isn't that something? ;-)
>
>> Actually I haven't patched pizza, just extended one of their classes ;-)
>
>
> Even better.
>
>> I tried to compile pizza myself but ran into some troubles getting 
>> the bootstrap compiler for the pizza files up and running, and since 
>> extending their classes did the trick I didn't bother too much. As a 
>> side note: I kinda like the strongly typed hashtables of the pizza 
>> language (highly irrelevant for the classloading matter)
>>
>> The code is actually written for my employer, but he has on more 
>> occasions agreed to let solutions sieve back to the open source 
>> community - and this thing is really small....
>
>
> Great.
>
>> A small disclaimer: I haven't tested this beast thoroughly, but I 
>> know for sure that statements like "import 
>> java.util.logging.SocketHandler" and "import java.util.loggging.*" 
>> work equally well - which was one of my major concerns since all I 
>> have is a classloader (and not a jar-file) and hence I cannot list 
>> the contents of a package (I might be wrong on this). But it seems 
>> that the pizza compiler is doing *the right thing* (tm) and scanning 
>> all star-imports for classes not explicitly imported.
>
>
> good
>
>> First of all a big thank you to the Pizza people for creating the 
>> compiler that makes my small addon possible - as written I've posted 
>> a message on the pizzacompiler discussion forum, asking whether they 
>> would like to add my stuff, 
>> http://sourceforge.net/forum/forum.php?thread_id=766013&forum_id=129481, 
>> but no reply yet - apparently not everybody is as eager about 
>> classloding compilers as cocoon folkes. I will immediately send of an 
>> email to the developers asking if they could accept my stuff. In the 
>> mean time please copy my stuff if you need it. Find attached a 
>> zip-file containing both source and compiled version - dump the 
>> neupart-pizza.jar into WEB-INF, edit cocoon.xconf to use the 
>> com.neupart.cocoon.pizza.ClassLoadingPizza compiler instead of the 
>> normal Pizza compiler class - and off you go!
>
>
> Great. I'll try it ASAP.
>
>> This version might not be the final say on the issue!
>
>
> ok
>
> thanks much
>



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Compiling with Servlet spec 2.3 classloading

Posted by Nicola Ken Barozzi <ni...@apache.org>.

Christopher Oliver wrote:
> OK. Done. I've placed the most permissive, non-copyleft license I could 
> find on this code.

Thank you very much; sorry for being a PITA, but small details sometimes 
can bring problems down the road. I appreciate it, thanks :-)

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Compiling with Servlet spec 2.3 classloading

Posted by Christopher Oliver <re...@verizon.net>.
OK. Done. I've placed the most permissive, non-copyleft license I could 
find on this code.

Regards,

Chris

Nicola Ken Barozzi wrote:

>
> Christopher Oliver wrote:
> [...]
>
>> There is no license for the code I've written.
>
>
> Please, add a license to it, possibly an Apache-derived license.
> If code is not licensed, we cannot use it, because we have no right to 
> do so.
> When/if the time will come, you can always decide to donate it to Apache.
>
> Sorry for these legal points, and IANAL, but I'm having problems ATM 
> to get a program that some want to donate to Apache that is not 
> licensed and we have to track down all contributors to sign an agreement.
>
> Thank you.
>



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Compiling with Servlet spec 2.3 classloading

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Christopher Oliver wrote:
[...]
> There is no license for the code I've written.

Please, add a license to it, possibly an Apache-derived license.
If code is not licensed, we cannot use it, because we have no right to 
do so.
When/if the time will come, you can always decide to donate it to Apache.

Sorry for these legal points, and IANAL, but I'm having problems ATM to 
get a program that some want to donate to Apache that is not licensed 
and we have to track down all contributors to sign an agreement.

Thank you.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Java compiler API [WAS Re: Compiling with Servlet spec 2.3 classloading]

Posted by Ovidiu Predescu <ov...@apache.org>.
Hi,

Great stuff, Chris! I didn't realize Eclipse comes with its own  
compiler. Your API is a great tool to abstract out the inner details of  
a compiler. I'll check out both of them to see how they could be used  
in a useful way in some of the things I have in mind.

I'm primarily interested in coming up with a way to define Scheme-like  
hygienic macros for Java, which would allow extending the Java language  
syntax in a clean way by developers:

http://webweavertech.com/ovidiu/weblog/archives/000122.html

Having a compiler API that can be used makes a huge difference.

Regards,
Ovidiu

On Saturday, Dec 14, 2002, at 15:37 US/Pacific, Christopher Oliver  
wrote:

> I've also had to try to solve the embedded compiling problem (for  
> other reasons) and I've also tried to use Pizza. Unfortunately, Pizza  
> is very poor quality code and has severe limitations that made it  
> unusable for me. Instead I've used the eclipse.org Java Development  
> Tools compiler (which is excellent) to implement a simple embeddable  
> compiler API. I've placed a copy of the source code on my ftp server  
> if anyone is interested in using it  
> (ftp://ftp.primaryinterface.com/pub/javacAPI). There is no license for  
> the code I've written. The API itself has no dependencies on other  
> software. And the provided implementation has no dependencies other  
> than on eclipse (don't know if that is a problem for Apache  
> projects...).
>
> The provided zip file contains source, compiled code, javadocs, and  a  
> couple of example programs: one that simulates the javac command line  
> compiler, and another that demonstrates compiling source code in  
> memory and dynamically loading the resulting classes.
>
> Regards,
>
> Chris
>
>
>
> Stefano Mazzocchi wrote:
>
>> jakob.dalsgaard@neupart.dk wrote:
>>
>>> Gee, now I've been lurking about the cocoon mailing lists for years,  
>>> posting small and easily ignorable questions - and now this reply;  
>>> it's probably the first time I see: "You are my man, really. I love  
>>> this." on this mailing list... thanks Stefano - nice to know that I  
>>> might be on the right path.
>>
>>
>> Hey, you saved me from writing a java compiler, isn't that something?  
>> ;-)
>>
>>> Actually I haven't patched pizza, just extended one of their classes  
>>> ;-)
>>
>>
>> Even better.
>>
>>> I tried to compile pizza myself but ran into some troubles getting  
>>> the bootstrap compiler for the pizza files up and running, and since  
>>> extending their classes did the trick I didn't bother too much. As a  
>>> side note: I kinda like the strongly typed hashtables of the pizza  
>>> language (highly irrelevant for the classloading matter)
>>>
>>> The code is actually written for my employer, but he has on more  
>>> occasions agreed to let solutions sieve back to the open source  
>>> community - and this thing is really small....
>>
>>
>> Great.
>>
>>> A small disclaimer: I haven't tested this beast thoroughly, but I  
>>> know for sure that statements like "import  
>>> java.util.logging.SocketHandler" and "import java.util.loggging.*"  
>>> work equally well - which was one of my major concerns since all I  
>>> have is a classloader (and not a jar-file) and hence I cannot list  
>>> the contents of a package (I might be wrong on this). But it seems  
>>> that the pizza compiler is doing *the right thing* (tm) and scanning  
>>> all star-imports for classes not explicitly imported.
>>
>>
>> good
>>
>>> First of all a big thank you to the Pizza people for creating the  
>>> compiler that makes my small addon possible - as written I've posted  
>>> a message on the pizzacompiler discussion forum, asking whether they  
>>> would like to add my stuff,  
>>> http://sourceforge.net/forum/ 
>>> forum.php?thread_id=766013&forum_id=129481, but no reply yet -  
>>> apparently not everybody is as eager about classloding compilers as  
>>> cocoon folkes. I will immediately send of an email to the developers  
>>> asking if they could accept my stuff. In the mean time please copy  
>>> my stuff if you need it. Find attached a zip-file containing both  
>>> source and compiled version - dump the neupart-pizza.jar into  
>>> WEB-INF, edit cocoon.xconf to use the  
>>> com.neupart.cocoon.pizza.ClassLoadingPizza compiler instead of the  
>>> normal Pizza compiler class - and off you go!
>>
>>
>> Great. I'll try it ASAP.
>>
>>> This version might not be the final say on the issue!
>>
>>
>> ok
>>
>> thanks much
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Java compiler API [WAS Re: Compiling with Servlet spec 2.3 classloading]

Posted by Ovidiu Predescu <ov...@cup.hp.com>.
Hi,

Great stuff, Chris! I didn't realize Eclipse comes with its own  
compiler. Your API is a great tool to abstract out the inner details of  
a compiler. I'll check out both of them to see how they could be used  
in a useful way in some of the things I have in mind.

I'm primarily interested in coming up with a way to define Scheme-like  
hygienic macros for Java, which would allow extending the Java language  
syntax in a clean way by developers:

http://webweavertech.com/ovidiu/weblog/archives/000122.html

Having a compiler API that can be used makes a huge difference.

Regards,
Ovidiu

On Saturday, Dec 14, 2002, at 15:37 US/Pacific, Christopher Oliver  
wrote:

> I've also had to try to solve the embedded compiling problem (for  
> other reasons) and I've also tried to use Pizza. Unfortunately, Pizza  
> is very poor quality code and has severe limitations that made it  
> unusable for me. Instead I've used the eclipse.org Java Development  
> Tools compiler (which is excellent) to implement a simple embeddable  
> compiler API. I've placed a copy of the source code on my ftp server  
> if anyone is interested in using it  
> (ftp://ftp.primaryinterface.com/pub/javacAPI). There is no license for  
> the code I've written. The API itself has no dependencies on other  
> software. And the provided implementation has no dependencies other  
> than on eclipse (don't know if that is a problem for Apache  
> projects...).
>
> The provided zip file contains source, compiled code, javadocs, and  a  
> couple of example programs: one that simulates the javac command line  
> compiler, and another that demonstrates compiling source code in  
> memory and dynamically loading the resulting classes.
>
> Regards,
>
> Chris
>
>
>
> Stefano Mazzocchi wrote:
>
>> jakob.dalsgaard@neupart.dk wrote:
>>
>>> Gee, now I've been lurking about the cocoon mailing lists for years,  
>>> posting small and easily ignorable questions - and now this reply;  
>>> it's probably the first time I see: "You are my man, really. I love  
>>> this." on this mailing list... thanks Stefano - nice to know that I  
>>> might be on the right path.
>>
>>
>> Hey, you saved me from writing a java compiler, isn't that something?  
>> ;-)
>>
>>> Actually I haven't patched pizza, just extended one of their classes  
>>> ;-)
>>
>>
>> Even better.
>>
>>> I tried to compile pizza myself but ran into some troubles getting  
>>> the bootstrap compiler for the pizza files up and running, and since  
>>> extending their classes did the trick I didn't bother too much. As a  
>>> side note: I kinda like the strongly typed hashtables of the pizza  
>>> language (highly irrelevant for the classloading matter)
>>>
>>> The code is actually written for my employer, but he has on more  
>>> occasions agreed to let solutions sieve back to the open source  
>>> community - and this thing is really small....
>>
>>
>> Great.
>>
>>> A small disclaimer: I haven't tested this beast thoroughly, but I  
>>> know for sure that statements like "import  
>>> java.util.logging.SocketHandler" and "import java.util.loggging.*"  
>>> work equally well - which was one of my major concerns since all I  
>>> have is a classloader (and not a jar-file) and hence I cannot list  
>>> the contents of a package (I might be wrong on this). But it seems  
>>> that the pizza compiler is doing *the right thing* (tm) and scanning  
>>> all star-imports for classes not explicitly imported.
>>
>>
>> good
>>
>>> First of all a big thank you to the Pizza people for creating the  
>>> compiler that makes my small addon possible - as written I've posted  
>>> a message on the pizzacompiler discussion forum, asking whether they  
>>> would like to add my stuff,  
>>> http://sourceforge.net/forum/ 
>>> forum.php?thread_id=766013&forum_id=129481, but no reply yet -  
>>> apparently not everybody is as eager about classloding compilers as  
>>> cocoon folkes. I will immediately send of an email to the developers  
>>> asking if they could accept my stuff. In the mean time please copy  
>>> my stuff if you need it. Find attached a zip-file containing both  
>>> source and compiled version - dump the neupart-pizza.jar into  
>>> WEB-INF, edit cocoon.xconf to use the  
>>> com.neupart.cocoon.pizza.ClassLoadingPizza compiler instead of the  
>>> normal Pizza compiler class - and off you go!
>>
>>
>> Great. I'll try it ASAP.
>>
>>> This version might not be the final say on the issue!
>>
>>
>> ok
>>
>> thanks much
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org