Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Java Applet Size Reduction

Posted on 1998-09-19
5
Medium Priority
?
241 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 100 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
In this post we will learn different types of Android Layout and some basics of an Android App.
The viewer will learn how to implement Singleton Design Pattern in Java.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

885 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