Hello Dieter,

At 20:02 06.08.00 +0200, you wrote:
>Can anybody tell me, how I can compress Java-Classes best, so that the two
>big browsers still can work with the files? The Zipper produces too large
>files for my porpuse and the cabinet-files would make small enough files,
>but they can only be used by the IE! A Java-Archive is of about the same
>size as a zipped file and my browsers have problems with zipped jar-files,
>which would be of acceptable size.
>
>Does anybody know a better solution for this problem?

Partly, maybe.

First, you have already solved half the problem. If MSIE likes CAB files, let
it have CAB files! There are some tricks you can play with tags and/or
JavaScript which will let you offer slightly different tags (if worst comes to
worst, complete separate pages) to MSIE and Netscape. I don't know how
to do this, but from what I hear it should be feasible. Thus, at the expense of
some extra work, you've made the MSIE users, who are a majority by now,
happy.

As far as I know, Netscape STILL doesn't work well with zipped JARs, nor am
I aware of a different compressed format for packaging Java classes it would
prefer.

There is some dreadful trickiness you COULD do, given enough time and
motivation: You could have just a small handful of classes in a non-ZIPped
JAR, including your own Class Loader, which could conceivably load Java
classes from a stream other than the usual; and this stream could well run
through a ZipInputStream or GZIPInputStream opened to the URL of your
ZIPped file containing the other classes. Unfortunately, I don't know if the
Applet sandbox in Netscape will allow you to install and/or use your own
ClassLoader. I've never tried this, it just seemed like a cool idea.

Measures which will probably benefit both MSIE and NS include:
- Stripping debug information out of your code
(or leaving it out to begin with),
- turning off inlining (this will cost you a little performance, though),
- running your code through an obfuscator. This will change names
like MyLongClassName to 'a' or 'b' and make your code hard to read
for prying (decompiling) humans but considerably shorter to download.
This even improves performance a little.

Hth,

-Carl-

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to