|
Author |
Topic: jar files exported-to-web separately (Read 2126 times) |
|
arielm
|
jar files exported-to-web separately
« on: Oct 28th, 2003, 6:08pm » |
|
on Oct 28th, 2003, 10:25am, arielm wrote:just a suggestion: when multiple jars are present in the code folder, wouldn't it be simplier / more modular to just copy them to the exported applet folder (i.e. instead of including them into the sketch's jar) and link them (comma-separated) through the applet's archive attribute in the the html host page i know that it works well both with ms and sun VMs on windows (but what about mac) |
| on Oct 28th, 2003, 3:00pm, fry wrote:this would be much preferred if it can be proven to work smoothly with the different VMs. in the past it didn't, but my information on this one might be too old. if someone were willing to test across the different platforms, or at least provide example sites that are doing such a thing, i'd be open to switching. |
| i've made a test case: http://www.chronotext.org/processing/multi_jars/ really curious to see if it works on mac! one advantage of using this method is that it's possible to use one single "bagel.jar" for a lot of sketches that are in the same folder (an obvious advantage is for saving web space but the main advantage may be to have "bagel.jar" cached once for all, reducing dramatically download time!) in this test case, there's 3 different jar files: 1) a jar with a processing sketch (only one class). 2) a jar with bagel (version 056). 3) another jar with a controller that opens in a java popup and interact with the main applet (a project of mine that will be published soon). and the applet tag looks like: <applet code="controller_2" archive="controller_2.jar, bagel.jar, controller.jar" width=...
|
« Last Edit: Oct 28th, 2003, 11:22pm by arielm » |
|
Ariel Malka | www.chronotext.org
|
|
|
neave
|
Re: jar files exported-to-web separately
« Reply #2 on: Nov 10th, 2003, 5:48pm » |
|
It works for me. I think this would be a really useful thing to add in as a default "export to web" setting. File sizes and download times would be much improved.
|
:: www.neave.com ::
|
|
|
fry
|
Re: jar files exported-to-web separately
« Reply #3 on: Jul 7th, 2004, 5:37pm » |
|
so casey and i are discussing this one a bit, but haven't been able to make a decision on the best route. pros for single jar: 1) simple sketches won't need to have multiple files, or a jar for a single .class file. 2) exporting to a double-clickable jar file will require a single .jar anyway, so to support alternate methods of packaging for different types of export can introduce new problems/bugs/annoyances 3) are there really that many instances where you have many p5 applets in a single folder? in favor of multiple jar: 1) why break up perfectly good .jar files and potentially cause problems when they're merged back together? 2) speed increase for people with many applets in one folder. anyone care to share some input on this one?
|
|
|
|
skloopy
|
Re: jar files exported-to-web separately
« Reply #4 on: Jul 7th, 2004, 9:08pm » |
|
Hmm if only you could have jars inside of jars.. I tried the multi-jar test on OS 9 IE (MRJ?) and it works. I think that beginners would understand extra jar files if they put them into the code folder themselves. But I think it makes sense to put all of the internal P5 stuff in one jar file. And for making standalone apps, like fry says, it's really convenient to have everything packaged in one jar so you can just add the manifest and go.
|
|
|
|
cello
|
Re: jar files exported-to-web separately
« Reply #5 on: Sep 12th, 2004, 5:52am » |
|
Why not make it an option? When you export for the web, separate jars doesn't really hurt, you need to upload more than one file, anyway. When you export for standalone, have it all in one jar (or even bundle in an exe?). Marcello
|
|
|
|
fry
|
Re: jar files exported-to-web separately
« Reply #6 on: Sep 12th, 2004, 6:31pm » |
|
we try to avoid making things an option wherever possible, because it reduces complexity & sources of bugs. we may have to make this an option, though.. i have to code it up today so we'll see what happens
|
|
|
|
|