Solved

Java Applet Size Reduction

Posted on 1998-09-19
5
235 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
eclipse package explorer vs project explorer view 2 121
factorial example 4 39
ejb on wildfly 5 19
How to determine if a string is a valid SHA value 7 28
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

815 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now