You can use java's pack200 tool to compress your jar down quite a bit:

http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/pack200.html

I haven't tried it yet, but this ClassLoader that will decompress the
pack200 archive into a temp directory before loading the classes.

http://scala.sygneca.com/code/compressed-executable-jar

Kevin

On Apr 17, 7:37 pm, Stuart Sierra <the.stuart.sie...@gmail.com> wrote:
> On Apr 17, 7:36 pm, "Dimiter \"malkia\" Stanev" <mal...@gmail.com>
> wrote:
>
> > Is there any alternative (ClassLoader?) to store the .class files in a
> > different compressed format?.NET can store lots of classes in one
> > assembly? Is there something like that for JVM?
>
> ClassLoaders can do almost anything, including load classes via HTTP,
> so I expect it would be possible to write a custom ClassLoader that
> uses a different compression format (like tar.gz).  But it wouldn't
> necessarily be easy.  ZIP is convenient because it permits random
> access to any file within the archive, which tar does not.
>
> Here's an (old) article with a related 
> example:http://www.javaworld.com/javaworld/jw-04-2000/jw-0421-zipclass.html
>
> -Stuart Sierra
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to