Hello, Nathan,

Had Nikolay said anything about JVM modification? As far as I understand
him the class library should be just enhanced with this smart class
loader.

Now imagine how our reproducers would look in JIRA:

java -cp http://svn.apache.org/...
-Djava.system.class.loader=org.apache.harmony.Nikolagent TestClass

Just cut & paste it in your console with Harmony JRE in PATH!
Nikolay's class loader will manage dependencies in the class path (or
should I call it source path now?), download required source files to
the temporary cache, compile them and execute.

This class loader can even decide should it launch the test via TestNG
runner or JUnit. It can understand OSGi bundles. It can download binary
modules from maven repositories worldwide.

We can even think of distributed test execution over computers of
Harmony community members. This can be a protocol for you to test your
changes on Pavel's Linux if Pavel sets some security checkbox in his
Harmony JRE allowing a trust mode for test requests from Harmony
committers. 

Doesn't this sound cool?

With best regards,
Alexei Fedotov,
Intel Middleware Products Division

>-----Original Message-----
>From: Nathan Beyer [mailto:[EMAIL PROTECTED]
>Sent: Saturday, October 07, 2006 3:04 AM
>To: harmony-dev@incubator.apache.org
>Subject: Re: [general] Dynamic class loading
>
>Stefano is correct, this doesn't require anything special in the VM.
>In fact, the basics of this already exist -- JavaServer Pages.
>
>Is compiling code a big problem?
>
>-Nathan
>
>On 10/6/06, Stefano Mazzocchi <[EMAIL PROTECTED]> wrote:
>> Nikolay Chugunov wrote:
>> > From the beginning of learning Java and till now I hate to compile
java
>> > source code before run it. I propose to develop easy solution for
this
>> > problem: compile java sources on fly.
>> >
>> > Command to do it can look like:
>> >
>> >
>> >
>> > java -cp ...:mytool.jar
>> > -Djava.system.class.loader=classloader.MyClassLoaderHelloWorld
>> >
>> >
>> >
>> > When executing any application, if MyClassLoader does not find
compiled
>> > class in class path, it will try to find file-source of this class
with
>> > java
>> > extension in class path. If MyClassLoader finds this file, then
>> > MyClassLoader will compile source on fly and load class to
>MyClassLoader
>> > using *defineClass* method.
>> >
>> >
>> >
>> > The second improvement which I propose to develop is to load jar
file
>from
>> > internet, if user specify URL to jar file in command line.
>> >
>> >
>> >
>> > MyClassLoader may cache compiled classes and loaded jars.
MyClassLoader
>may
>> > use standard and Eclipse compiler to compile sources. Also
>MyClassLoader
>> > may
>> > compile on fly other sources (like Jasmin). The base of my tool
will be
>> > existing URLClassLoader in Harmony.
>> >
>> >
>> > What do you think about my proposals?
>>
>> hmmm, I've thought about implementing something like this several
times
>> myself.... but I don't think you need to modify a JVM to achieve
that,
>> you can just execute a "loader" class that than knows your "source
path"
>> and has access to a nice compiler and does compilation at class
loading
>> time.
>>
>> or am I wrong?
>>
>> --
>> Stefano.
>>
>>
>> ---------------------------------------------------------------------
>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail:
[EMAIL PROTECTED]
>>
>>

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to