cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pier P. Fumagalli" <pier.fumaga...@eng.sun.com>
Subject Re: WEB-INF classloading and on the fly compilation
Date Thu, 14 Sep 2000 23:13:09 GMT
Vadim Gritsenko wrote:
> 
> Sources are available at www.sun.com; and even if they would be unavailable
> there are tools like JAD.
> 
> You just need to inherit ( or re-write ) from sun.tools.javac.Main and
> replace call
> 
>         // Create our Environment.
>         BatchEnvironment env = BatchEnvironment.create(out,
>                                                        sourcePathArg,
>                                                        classPathArg,
>                                                        sysClassPathArg,
>                                                        extDirsArg);
> 
> with something like this:
> 
>         BatchEnvironment env = new BatchEnvironment(out, srcClassPath,
> binClassPath);
> 
> where srcClassPahth and binClassPath - instances of your class which
> inherits from ClassPath,
> and this new ClassPath should load classes from where you want - from file
> system, RDBMS, network, ...

BUT... From my WEB-APP I don't know where the JARs I place in
WEB-INF/lib are... They cannot even be on the filesystems...
The problem when compiling is basically resolving "import ...;"
statements in java code of classes included WITHIN the WEB-APP...
There's no portable way of doing that...

The only solution would be to have a compiler that, instead of relying
on files, could rely on Class object instances as loaded by the
classloader...

	Pier

Mime
View raw message