• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Can you include only a partial Java Runtime with you applications?

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.. been away from Java development for a few years. Has anything changed about distributing the JRE with your applications? Sun used to make you include the entire thing, which would bloat the size of download. Are you allowed to include a stripped down Sun Java JRE with your application? Tried Apache Harmony, but run into some glitches.
 
Ranch Hand
Posts: 624
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Java 6 Update 10 (which is in release candidate stage right now) is introducing a new Java Kernel. It allows for incremental downloading of the JRE and/or plug-in. This is so applications can start faster for users that do not yet have the JRE installed. It first downloads the parts that are needed, starts the application, and then downloads the remainder.

I have not done enough reading on it to know if it will allow you to limit the size of the JRE you bundle with an application. You can look here (http://java.sun.com/developer/technicalArticles/javase/java6u10/index.html) for a technical article on what Java 6 update 10 is bringing to the table. (Not sure why they are doing this as an "update" rather than a .1 release.) I believe the Java Kernel is geared towards applets and Java Web Start (JWS) applications, so it may not offer what you are looking for. But again, I've only cursorily read on the subject.

There have been a number of articles on the subject on java.net as well. So Googling that site for Java Kernel might give you some more info.
[ August 25, 2008: Message edited by: Mark Vedder ]
 
Mark Vedder
Ranch Hand
Posts: 624
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
p.s. the Java 6 Update 10 release candidate is available for download.
 
Gus Wilco
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hmmm... sounds like c# might be a better choice for developing desktop Apps for Windows :-(

Was hoping that Sun would have allowed a stripped down, private JRE to be distributed as part of my Application.
 
Sheriff
Posts: 28350
97
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Gus Wilco:
hmmm... sounds like c# might be a better choice for developing desktop Apps for Windows :-(

Was hoping that Sun would have allowed a stripped down, private JRE to be distributed as part of my Application.

I have been involved with a C# desktop application, and our install procedure does involve installing the .Net runtime. You can't assume that will already be on a Windows PC. And it's about the same size as a JRE, i.e. about 10 or 20 megs. So, if ease of installation is your primary criterion for choosing, C# isn't better.

Sun does allow installing a private JRE, but not a "stripped-down" one, whatever that might be. I don't know whether you can install a private .Net runtime or not.
 
Mark Vedder
Ranch Hand
Posts: 624
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might want to take a look at yGuard which is a free Java� Bytecode Obfuscator and Shrinker. With "regular" third party jars, it will examine your code and shrink the API jars down to just the classes you are using, and their dependencies, from the jar:


from http://www.yworks.com/en/products_yguard_about.html

Code Shrinking: drastically reduces the size of the input Jar files if your application does not use all of the contained bytecode.
The shrinking engine analyzes the bytecode of all input Jar files in order to determine which code entities can not be reached from a set of given code entry points. These obsolete code fragments (either entire classes or single methods and fields) will then be removed by yGuard. If you use any third party libraries, you will probably benefit a lot from the yGuard shrinking engine, since applications usually do not use all of the functionality provided by an external library and a large fraction of the contained bytecode and resources can be safely removed.



I've never tried to use it on the actual JRE jars (such as rt.jar)... don't know if you even can... but who knows... maybe it will work. Risky in my humble opinion... but "cutting edge" to someone else perhaps
[ August 25, 2008: Message edited by: Mark Vedder ]
 
what if we put solar panels on top of the semi truck trailer? That could power this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic