Distributable libraries?

Discussion in 'Java' started by Steve Sobol, Nov 15, 2004.

  1. Steve Sobol

    Steve Sobol Guest

    Is there a set of distributable libraries I can package with my Java
    application that will allow it to run, instead of requiring people to install a
    JVM? (Much like you can distribute the Visual Basic runtime DLL to allow people
    to use your compiled VB app)

    I'm thinking perhaps jvm.dll or libjvm.so along with a handful of other
    libraries - can this be done? Does Sun approve of doing something like this?

    --
    JustThe.net Internet & New Media Services, http://JustThe.net/
    Steven J. Sobol, Geek In Charge / 888.480.4NET (4638) /
    PGP Key available from your friendly local key server (0xE3AE35ED)
    Apple Valley, California Nothing scares me anymore. I have three kids.
    Steve Sobol, Nov 15, 2004
    #1
    1. Advertising

  2. Steve Sobol

    Chris Smith Guest

    Steve Sobol wrote:
    > Is there a set of distributable libraries I can package with my Java
    > application that will allow it to run, instead of requiring people to install a
    > JVM? (Much like you can distribute the Visual Basic runtime DLL to allow people
    > to use your compiled VB app)
    >
    > I'm thinking perhaps jvm.dll or libjvm.so along with a handful of other
    > libraries - can this be done? Does Sun approve of doing something like this?


    The JRE is redistributable, and there is a README.TXT file in the JRE
    listing those pieces that can be excluded. The remaining pieces must be
    redistributed as a part of the complete JRE. You are not required to
    run the JRE installer, and the JRE will work without the installer
    having been run.

    If it's important to you, though, that the files be only ".dll" or
    ".so" files, then you're out of luck.

    --
    www.designacourse.com
    The Easiest Way To Train Anyone... Anywhere.

    Chris Smith - Lead Software Developer/Technical Trainer
    MindIQ Corporation
    Chris Smith, Nov 15, 2004
    #2
    1. Advertising

  3. Steve Sobol

    Steve Sobol Guest

    Chris Smith wrote:
    > The JRE is redistributable, and there is a README.TXT file in the JRE
    > listing those pieces that can be excluded. The remaining pieces must be
    > redistributed as a part of the complete JRE. You are not required to
    > run the JRE installer, and the JRE will work without the installer
    > having been run.
    >
    > If it's important to you, though, that the files be only ".dll" or
    > ".so" files, then you're out of luck.


    No... I just really would prefer not to have to distribute the command-line
    executables and some other unecessary stuff; this is a project where I'd build
    an executable that loaded the JVM and app using the Invocation API, and I don't
    want to have to bundle 10-15 MB worth of extra stuff with the app. I'll check
    the README - thank you.

    --
    JustThe.net Internet & New Media Services, http://JustThe.net/
    Steven J. Sobol, Geek In Charge / 888.480.4NET (4638) /
    PGP Key available from your friendly local key server (0xE3AE35ED)
    Apple Valley, California Nothing scares me anymore. I have three kids.
    Steve Sobol, Nov 15, 2004
    #3
  4. Steve Sobol

    Steve Sobol Guest

    Steve Sobol wrote:
    > Chris Smith wrote:
    >
    >> The JRE is redistributable, and there is a README.TXT file in the JRE
    >> listing those pieces that can be excluded. The remaining pieces must
    >> be redistributed as a part of the complete JRE. You are not required
    >> to run the JRE installer, and the JRE will work without the installer
    >> having been run.
    >>
    >> If it's important to you, though, that the files be only ".dll" or
    >> ".so" files, then you're out of luck.

    >
    >
    > No... I just really would prefer not to have to distribute the
    > command-line executables and some other unecessary stuff; this is a
    > project where I'd build an executable that loaded the JVM and app using
    > the Invocation API, and I don't want to have to bundle 10-15 MB worth of
    > extra stuff with the app. I'll check the README - thank you.


    Ack. The *entire* 1.4.2 JRE is 40MB. And there are only a few items that Sun
    says are optional.

    *shudder*


    --
    JustThe.net Internet & New Media Services, http://JustThe.net/
    Steven J. Sobol, Geek In Charge / 888.480.4NET (4638) /
    PGP Key available from your friendly local key server (0xE3AE35ED)
    Apple Valley, California Nothing scares me anymore. I have three kids.
    Steve Sobol, Nov 15, 2004
    #4
  5. Steve Sobol wrote:
    > Chris Smith wrote:
    >
    >> The JRE is redistributable, and there is a README.TXT file in the JRE
    >> listing those pieces that can be excluded. The remaining pieces must
    >> be redistributed as a part of the complete JRE. You are not required
    >> to run the JRE installer, and the JRE will work without the installer
    >> having been run.
    >>
    >> If it's important to you, though, that the files be only ".dll" or
    >> ".so" files, then you're out of luck.

    >
    >
    > No... I just really would prefer not to have to distribute the
    > command-line executables and some other unecessary stuff; this is a
    > project where I'd build an executable that loaded the JVM and app using
    > the Invocation API, and I don't want to have to bundle 10-15 MB worth of
    > extra stuff with the app. I'll check the README - thank you.
    >


    The command line executables are only just over 1MB (unpacked) in total
    for 1.5, so there isn't really a lot to be saved there. The big items
    are in the lib directory.

    Mark Thornton
    Mark Thornton, Nov 15, 2004
    #5
  6. Steve Sobol

    Chris Smith Guest

    Steve Sobol wrote:
    > Ack. The *entire* 1.4.2 JRE is 40MB. And there are only a few items that Sun
    > says are optional.


    Make sure that (unless you need otherwise) you're getting the Windows-
    only version. MindIQ distributes an application with the 1.4.2 JRE, and
    the entire resulting file is about 30 MB in size; the JRE is probably
    about 67% of that.

    --
    www.designacourse.com
    The Easiest Way To Train Anyone... Anywhere.

    Chris Smith - Lead Software Developer/Technical Trainer
    MindIQ Corporation
    Chris Smith, Nov 15, 2004
    #6
  7. Steve Sobol

    Eric Sosman Guest

    Steve Sobol wrote:
    >
    > Ack. The *entire* 1.4.2 JRE is 40MB. And there are only a few items that Sun
    > says are optional.


    What are you measuring (or, how are you measuring it)?
    From the download page for 1.4.2_06, the download sizes are

    Windows 14.96 MB
    Linux 13.24
    Solaris SPARC 14.08 (+ 4.47 for 64-bit)
    Solaris x86 12.48

    None of these is anywhere near 40MB, and the total of all
    four (five) is 54.76 (59.23), also not convincingly close
    to 40MB.

    (Disclaimer: Just because I'm writing about Sun stuff
    from a sun.com address, don't assume I speak for Sun.
    "The Secretary will disavow all knowledge," as 'tis said.)

    --
    Eric Sosman, Nov 15, 2004
    #7
  8. On Mon, 15 Nov 2004 15:08:50 -0500, Eric Sosman wrote:

    > Steve Sobol wrote:
    >>
    >> Ack. The *entire* 1.4.2 JRE is 40MB. And there are only a few items that Sun
    >> says are optional.

    >
    > What are you measuring (or, how are you measuring it)?
    > From the download page for 1.4.2_06, the download sizes are
    >
    > Windows 14.96 MB


    That reminds me. The download comes zipped and compressed,
    rt.jar on the file system is zipped but uncompressed.

    HTH

    --
    Andrew Thompson
    http://www.PhySci.org/codes/ Web & IT Help
    http://www.PhySci.org/ Open-source software suite
    http://www.1point1C.org/ Science & Technology
    http://www.LensEscapes.com/ Images that escape the mundane
    Andrew Thompson, Nov 15, 2004
    #8
  9. Steve Sobol

    Steve Sobol Guest

    Eric Sosman wrote:
    > Steve Sobol wrote:
    >
    >>Ack. The *entire* 1.4.2 JRE is 40MB. And there are only a few items that Sun
    >>says are optional.

    >
    >
    > What are you measuring (or, how are you measuring it)?


    Mmmm, I'm not sure why my program directory (c:\program
    files\java\j2re1.4.2_03) has 40MB of stuff in it. I did, in fact, download the
    Windows 1.4.2_06 JRE just earlier today and it is only 15MB.

    rt.jar (in this installation) counts for about 25MB of that 40MB total.

    --
    JustThe.net Internet & New Media Services, http://JustThe.net/
    Steven J. Sobol, Geek In Charge / 888.480.4NET (4638) /
    PGP Key available from your friendly local key server (0xE3AE35ED)
    Apple Valley, California Nothing scares me anymore. I have three kids.
    Steve Sobol, Nov 15, 2004
    #9
  10. Steve Sobol

    Steve Sobol Guest

    Steve Sobol wrote:

    > rt.jar (in this installation) counts for about 25MB of that 40MB total.


    OK, so the reason is that it is stored uncompressed.

    Can I unarchive it and re-archive it using Winzip on its "maximum compression"
    setting? Will this cause any problems other than slower access to rt.jar?

    Or, another solution:

    I created a blank ZIP file using Winzip, and using maximum compression, and put
    a copy of rt.jar into it. The ZIP ends up being about 6MB. How about setting up
    an installer that unzips rt.jar at install time?

    --
    JustThe.net Internet & New Media Services, http://JustThe.net/
    Steven J. Sobol, Geek In Charge / 888.480.4NET (4638) /
    PGP Key available from your friendly local key server (0xE3AE35ED)
    Apple Valley, California Nothing scares me anymore. I have three kids.
    Steve Sobol, Nov 15, 2004
    #10
  11. Steve Sobol

    Eric Sosman Guest

    Steve Sobol wrote:
    > Steve Sobol wrote:
    >
    >>rt.jar (in this installation) counts for about 25MB of that 40MB total.

    >
    > OK, so the reason is that it is stored uncompressed.
    >
    > Can I unarchive it and re-archive it using Winzip on its "maximum compression"
    > setting? Will this cause any problems other than slower access to rt.jar?


    As an old boss of mine used to say, "I'd bet your
    life on it." In other words, I don't know. There might
    (or might not) be a chicken-and-egg problem, something
    like the JVM needing some rt.jar-resident classes to
    decompress compressed JAR members, that sort of thing.
    Why not try it and see?

    > Or, another solution:
    >
    > I created a blank ZIP file using Winzip, and using maximum compression, and put
    > a copy of rt.jar into it. The ZIP ends up being about 6MB. How about setting up
    > an installer that unzips rt.jar at install time?


    You must distribute all the required pieces of the
    JRE, but as far as I can tell it's not required that you
    distribute them in the same formats Sun uses. That is, I
    don't think there's anything preventing you from using
    your own installer, your own compression techniques, and
    your own Black Magic (tm), so long as the target system
    gets all the required bits. IANAL, though, so you might
    want to investigate further before sinking a lot of work
    into this approach.

    --
    Eric Sosman, Nov 15, 2004
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John
    Replies:
    1
    Views:
    338
    MikeS
    Aug 27, 2006
  2. gundlach
    Replies:
    1
    Views:
    490
    gundlach
    Aug 5, 2008
  3. John
    Replies:
    1
    Views:
    132
    MikeS
    Aug 27, 2006
  4. Venkat
    Replies:
    6
    Views:
    146
  5. Wesley Rishel
    Replies:
    5
    Views:
    157
    James Britt
    Apr 1, 2008
Loading...

Share This Page