Menu

#63 Java Executable Files

open
nobody
None
5
2013-09-25
2009-11-15
Anonymous
No

Okay, I hate Java just as much as the next guy, but JRE files can get pretty big for what they really do. I was wondering if there was a way that you might be able to add in compression for JRE files? They would have to be decompressable by the Java Runtime Envionment itself which makes it a bit more of a challenge, but I know your team could find a way if it's possible.

Discussion

  • László Molnár

    You mean .jar files? Those are already compressed AFAIK,

     
  • Nobody/Anonymous

    The JRE is a big JAR (ZIP compressed) file with many runtime library files. To make it smaller, you would need a way to omit libraries that your program is not actually using, but you cannot compress it much better than with ZIP apart from that.

     
  • Nobody/Anonymous

    To make JAR files shorter you can optimize and shrink the classes inside the JAR with ProGuard (http://proguard.sourceforge.net/).
    You can then generate an executable of the JAR file with Launch4j (http://launch4j.sourceforge.net/)
    After that you can use UPX to compress the generated executable.

     
  • nothize

    nothize - 2013-09-25

    But UPX doesn't pack the rdata.

     
  • László Molnár

    UPX compresses all the sections that are not marked as INFO. It doesn not care about the name of the sections.

     
    • nothize

      nothize - 2013-09-26

      Thank you for clarifying. Now I understand why Launch4j mark the rdata as INFO is to preserve the JAR nature.

       

Log in to post a comment.

MongoDB Logo MongoDB