You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Ian Leslie <ia...@lesliesoftware.com> on 2008/08/23 13:41:19 UTC

Question about distributing a smaller foot print of the JRE

I have been watching Harmony's progress for a little while now and am 
very excited about using Harmony with my application.  I have done 
some testing and am quite pleased with it.  However I cannot find 
information about how to distribute a JRE that has a smaller foot 
print than the full version.  I am hoping that there will be a way to 
download or create myself such a package.  Am I correct - when 
Harmony is complete will I be able to create a smaller foot print 
distribution for my application?

My application is using eclipse RCP for the GUI and therefore has no 
need for any of the Swing libraries.  There are other portions of the 
standard classes that it does not need either and I have always 
wanted to ship something smaller than the ~60M foot print of the 
JRE.  Can I expect to accomplish that from the Harmony project?

Thanks,

Ian


Re: Question about distributing a smaller foot print of the JRE

Posted by Tim Ellison <t....@gmail.com>.
Ian Leslie wrote:
> I must have misinterpreted the Harmony web site; I thought that one of
> the goals was to allow this kind of ship only what you need.

Harmony's modularity helps in a number of ways, including simplifying
development of the entire JDK, and replacing alternate implementations
of functional areas; but at this point we only distribute the entire SE
shaped runtime.

As Andrew and others said, you can easily remove some modules, but may
find that 'only what you need' includes things you didn't know you need
(i.e. you don't call the APIs directly, but the implementation of some
methods use them).  While we have aimed to minimize the coupling between
modules, the original Java APIs force some of these spaghetti dependencies.

With Java's lazy loading model you can get a long way.  For example you
can delete RMI, the CORBA code, Swing, Logging, etc. and the libraries
will still start up and run a number of headless apps quite happily.  Of
course if you remove Regex and then call String.split() you'll get a
class not found exception.

> When I
> read that it would be modular I took that to mean you could choose what
> to ship.  Sounds like it will require work on my part to accomplish.

If you can remove further dependencies between modules by rewriting a
method's implementation then I would be interested in taking that back
into Harmony (performance etc. being the same).

Regards,
Tim

> Thanks for the info,
> 
> Ian
> 
> At 20:19 2008-08-25, Andrew Cornwall wrote:
>> You'll run into a few interdependencies. A number of modules have API
>> that
>> requires Swing/AWT (such as beans - BeanInfo has a getIcon() method).
>> Sometimes the core depends on things in other modules (String.split())
>> needs
>> regex, and a number of modules like logging use split() - although you
>> can
>> recode them so they don't.) In general, it's a little effort to make
>> things
>> smaller, but definitely not impossible.
> <snip>
>> > > have always wanted to ship
>> > > something smaller than the ~60M foot print of the JRE.  Can I
>> expect to
>> > > accomplish that from the Harmony project?
> 
> 


Re: Question about distributing a smaller foot print of the JRE

Posted by Ian Leslie <ia...@lesliesoftware.com>.
I must have misinterpreted the Harmony web site; I thought that one 
of the goals was to allow this kind of ship only what you need.  When 
I read that it would be modular I took that to mean you could choose 
what to ship.  Sounds like it will require work on my part to accomplish.

Thanks for the info,

Ian

At 20:19 2008-08-25, Andrew Cornwall wrote:
>You'll run into a few interdependencies. A number of modules have API that
>requires Swing/AWT (such as beans - BeanInfo has a getIcon() method).
>Sometimes the core depends on things in other modules (String.split()) needs
>regex, and a number of modules like logging use split() - although you can
>recode them so they don't.) In general, it's a little effort to make things
>smaller, but definitely not impossible.
<snip>
> > > have always wanted to ship
> > > something smaller than the ~60M foot print of the JRE.  Can I expect to
> > > accomplish that from the Harmony project?


Re: Question about distributing a smaller foot print of the JRE

Posted by Andrew Cornwall <an...@gmail.com>.
You'll run into a few interdependencies. A number of modules have API that
requires Swing/AWT (such as beans - BeanInfo has a getIcon() method).
Sometimes the core depends on things in other modules (String.split()) needs
regex, and a number of modules like logging use split() - although you can
recode them so they don't.) In general, it's a little effort to make things
smaller, but definitely not impossible.


On Sun, Aug 24, 2008 at 8:10 PM, Xiao-Feng Li <xi...@gmail.com> wrote:

> I think that should be easy to leave out some unused Classlib
> packages. That is one of the design target to manage the packages
> independently with OSGI.
>
> There should be also opportunity to reduce the distribution size of
> DRLVM. For example, not all the JIT optimizations or GC algorithms are
> needed all the time. But it requires to touch the source code, so it
> is not so straightforward as with Classlib.
>
> Thanks,
> xiaofeng
>
> On Sat, Aug 23, 2008 at 7:41 PM, Ian Leslie
> <ia...@lesliesoftware.com> wrote:
> > I have been watching Harmony's progress for a little while now and am
> very
> > excited about using Harmony with my application.  I have done some
> testing
> > and am quite pleased with it.  However I cannot find information about
> how
> > to distribute a JRE that has a smaller foot print than the full version.
>  I
> > am hoping that there will be a way to download or create myself such a
> > package.  Am I correct - when Harmony is complete will I be able to
> create a
> > smaller foot print distribution for my application?
> >
> > My application is using eclipse RCP for the GUI and therefore has no need
> > for any of the Swing libraries.  There are other portions of the standard
> > classes that it does not need either and I have always wanted to ship
> > something smaller than the ~60M foot print of the JRE.  Can I expect to
> > accomplish that from the Harmony project?
> >
> > Thanks,
> >
> > Ian
> >
> >
>
>
>
> --
> http://xiao-feng.blogspot.com
>

Re: Question about distributing a smaller foot print of the JRE

Posted by Xiao-Feng Li <xi...@gmail.com>.
I think that should be easy to leave out some unused Classlib
packages. That is one of the design target to manage the packages
independently with OSGI.

There should be also opportunity to reduce the distribution size of
DRLVM. For example, not all the JIT optimizations or GC algorithms are
needed all the time. But it requires to touch the source code, so it
is not so straightforward as with Classlib.

Thanks,
xiaofeng

On Sat, Aug 23, 2008 at 7:41 PM, Ian Leslie
<ia...@lesliesoftware.com> wrote:
> I have been watching Harmony's progress for a little while now and am very
> excited about using Harmony with my application.  I have done some testing
> and am quite pleased with it.  However I cannot find information about how
> to distribute a JRE that has a smaller foot print than the full version.  I
> am hoping that there will be a way to download or create myself such a
> package.  Am I correct - when Harmony is complete will I be able to create a
> smaller foot print distribution for my application?
>
> My application is using eclipse RCP for the GUI and therefore has no need
> for any of the Swing libraries.  There are other portions of the standard
> classes that it does not need either and I have always wanted to ship
> something smaller than the ~60M foot print of the JRE.  Can I expect to
> accomplish that from the Harmony project?
>
> Thanks,
>
> Ian
>
>



-- 
http://xiao-feng.blogspot.com