OpenSource Java with WebStart Idea - new opportunity for Java on the desktop?

I changed my mind about opensource Java.  Although for an average developer or architect nothing will really change (JDK sourcecode was always freely available), opensource Java provides some really interesting opportunities. With a closed JRE, there is only all, or nothing approach. Either you have to install everything or nothing. JRE ist small (about 15 MB) but compressed, so the installation process takes some time.
JNLP can be used to install applications over the wire, but why not use JNLP, or similar technology to bootstrap JDK? Most of the "browser" applications, do not need RMI, CORBA, JDBC or even parts of the java.io or java.net packages. The filtering of classes can already happen during the build-process, the needed classes can be computed during the functional/integration testing. The first idea: a custom classloader (or MBean) which keeps track of all loaded system classes. This classes could be extracted from the Java SE, packed in a jar and then distributed to all clients. The size of the distribution should be significantly smaller.  A custom, JNLP-like (probably native) loader could fetch then the distribution and start the application. I only need some time to to find out whether it works .-).

Comments:

Isn't Sun already looking into this?

Actually all of this was possible under existing Java licenses. You could have used the JRL to produce a proof of concept then created a JSR to attempt to make it part of the standard. At least that is how it was supposed to work.

Keep in mind if you bastardize the runtime, you cannot technically call your solution Java. It's Adam Bein's Java compatible runtime.

I think you may have some success, but I also think you'll find that the dependencies run pretty deep so the overall savings might not be as great as expected.

Good luck!

Posted by Rob Abbe on January 17, 2007 at 02:27 AM CET #

Hi,

In jdk7 we will have this feature out of the box (yes there are other features beside syntactic sugar!).

http://blogs.sun.com/dannycoward/entry/java_se_7_caught_on
(@see the pdf or presentation)

It will be a mix between the new superJARs (JAM) and the Java Kernel. Additionally there will be a new JVM with tired compilation (no server/client VM anymore) which should decrease the jdk size again.

I also like the fact that Java is opensource (VM, compiler- until now). There have been already some interesting hacks e.g.: placing objects or arrays outside the heap (very useful for fast data transfer in real time graphics ;-).

Posted by Michael Bien on January 17, 2007 at 05:33 PM CET #

@Adam
you don't need to write a wrapper for the classloader. Just let the VM trace the classloading and redirect the console output to a file e.g.: java -XX:+TraceClassLoading MyMain > log.txt. The output is easy to parse. All opened JARs are also traced.

Lets call it IJD (incremental java deployment)
or HPCP (high pressure coffee pipeline) ;-)

regards
michael

Posted by Michael Bien on January 17, 2007 at 11:01 PM CET #

Philip Milne made some experiments a while back, and we were planing to do a project to do something along those lines for Groovy: It started here:
http://www.pmilne.net/Launcher/
Then moved here: http://sourceforge.net/projects/jailproject.

If I recall right, you could get a minimal runtime to bootsrap of a few hundred K of classes, then load from the netweork the rest of the RT classes as needed with a custom class loader (see here: http://jailproject.cvs.sourceforge.net/jailproject/jail/src/org/jail/Launcher.java?revision=1.2&view=markup )

Posted by Philippe on January 23, 2007 at 08:47 PM CET #

Post a Comment:
  • HTML Syntax: NOT allowed
...the last 150 posts
...the last 10 comments
License