Solved

Java Applet Size Reduction

Posted on 1998-09-19
5
237 Views
Last Modified: 2008-01-16
I'm desperate to reduce the size of my Java Applet.  I have taken all the measures I can think of (Jar & cab file formats, snipped all dead code, using a "Release" (not debug) build, etc), but I'm wondering if there's something non-obvious that I could do to my code that would reduce it's size?
0
Comment
Question by:sniles
  • 3
5 Comments
 

Author Comment

by:sniles
ID: 1224631
I think you misunderstood my question.  I am trying to reduce the size of the JAR, CAB and ZIP file containing the class files.
0
 
LVL 2

Expert Comment

by:triso
ID: 1224633
Hi,

Exactlly how large is "too large?"  Do you have lots of small class files or just  a few large ones?


0
 

Author Comment

by:sniles
ID: 1224634
I have several large classes, then about a dozen smaller ones.  Ideally, I'd like to reduce it's size by 20%.  It's currently about 120kb uncompressed, about 54kb when compressed in a .cab file.  If I could get a 30kb .cab file, I'd be quite happy.
0
 
LVL 3

Accepted Solution

by:
mjenkins earned 50 total points
ID: 1224635
I assume that the reason you are asking is to reduce the download, and thereby startup, time. May I suggest that if you've already optimised as best you can, split the cab/jar/zip files into smaller units. Use the -verbose option to watch the order that classes are loaded when your applet is running. Then split the cab files up so that your initial download is as small as possible to get something on the screen.

Typically, users are much more inclined to cut you slack (time-wise) once they see the first screen.
0
 

Author Comment

by:sniles
ID: 1224636
So you're saying that splitting up the cab/jar/zip files will allow the applet's screen elements to display prior to the point when the "Applet Started" message?  I have noticed that during the loading, the "Applet loaded" and "Applet initialized" messages are output (in the Java Console), then several more classes are loaded, then the "Applet Started" message is finally displayed.  To display the screen earlier, I can cut those classes that follow the "Applet Initialized"  off into a seperate jar/cab/zip? and just add that zip as a second archive= param, and a second <param name=cabbase value="myapp1.cab,myapp2.cab">  ?
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
java jdbc batch example 8 41
Android development question 2 55
How  can  i  resolve  HTTP Status 404 -? 8 46
Java: The Public Class Main 4 34
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question