[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.buckminster] Re: exporting product for Java web start

Hi Thomas,
thanks for the info on the JNLP download servlet. Didn't know it existed. Using the download servlet fixes my issues, but the product export that is being generated by Buckminster exports some of the plugins as 'exploded' plugins (not in a file with .JAR extension). Therefore the web start download is not able to download those plugins. Is it possible to tell the 'product export' action to export all plugins (both official org.eclipse plugins and our own plugins) in the JAR file format ?


Thanks,
Thomas.

Thomas Hallgren wrote:
Thomas Spiessens wrote:
Hi Thomas,
jnlp file generation works like a charm.

Two questions though:

1. When the jnlp file gets generated, the value of the codebase attribute is '$$codebase'. Is there a possibility to set a specific value during JNLP file generation ?

At present, the behavior for the JNLP generator is fixed and the output is intended for use with a server that runs a JNLP servlet that performs certain tasks (like replacing the $$codbase with the appropriate value for that particular installation). See: http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/downloadservletguide.html


The design is intended to be flexible so adding the needed parameters for a simpler setup should not be difficult. If you want to have a go at it, I suggest you have a look at our org.eclipse.buckminster.pde plugin. The relevant classes are found in the package org.eclipse.buckminster.pde.tasks and have names that start with JNLP.


The ant task that drives it all is found under the src/ant_tasks/org/eclipse/buckminster/pde/ant folder and the actual ant target is defined in the build.xml in package org.eclipse.buckminster.pde.antscripts.


2. When I export the jnlp file manually via the Eclipse IDE, the <jar> elements look like this <jar href="plugins/com.x.y_1.0.0.200801011000.jar"/>. The <jar> elements that get generated by Buckminster look like this <jar href="plugins/com.x.y.jar" version="200801011000"/>. When trying to download the application via Web Start, the Buckminster-generated version results in an HTTP 404 error when trying to download the plugins. If I change it to the former format, then the download succeeds. I'm not sure how web start maps that separate 'version' attribute to an actual resource in the HTTP GET request it sends out. Any idea why this is happening ?

Yes. Since file generated by Buckminster assumes that the server runs a JNLP servlet, it generates a version.xml file in the root that the servlet can make use of. In our case, that file looks something like this:

<?xml version="1.0" encoding="UTF-8"?>
<jnlp-versions>
    <resource>
        <pattern>
            <name>org.eclipse.buckminster.jnlp.product.jnlp</name>
            <version-id>0.2.0.r07461</version-id>
        </pattern>
        <file>org.eclipse.buckminster.jnlp.product_0.2.0.r07461.jnlp</file>
    </resource>
    <resource>
        <pattern>
            <name>startup.jar</name>
            <version-id>1.0.1.R33x_v20070828</version-id>
        </pattern>
        <file>startup.jar</file>
    </resource>
</jnlp-versions>

Regards,
Thomas Hallgren