This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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.
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 ]
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.
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:
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 ]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Can you include only a partial Java Runtime with you applications?