[OSM-dev] java selfupdate

Noel Grandin noel at peralex.com
Thu May 24 10:35:43 BST 2007

Signing is pretty straightforward, and gives you full access to the
local machine.

I can offer pointers on doing that, since I've recently used it in a

Note that I've had mixed results with getting updates to propogate
nicely - sometimes Java Webstart will just not for a while (several
hours) notice that there is an update on the server for quite some time.

Regards, Noel.

The relevant part of my ANT build script looks like:

        This produces a repacked JAR file, which is smaller and thus
        less to download.
    <target name="packAndSign" description="">
        <copy tofile="webapp/jws/allInOne.tmp.jar"
        <!-- rearrange the JAR so that signing does not get messed up -->
        <exec dir="webapp/jws" executable="pack200">
            <arg line="--repack"/>
            <arg line="allInOne.tmp.jar"/>
        <!-- sign the jar -->
            <fileset dir="webapp/jws" includes="allInOne.tmp.jar"/>
        <!-- now compress the JAR -->
        <exec dir="webapp/jws" executable="pack200">
            <arg line="allInOne.jar.pack.gz"/>
            <arg line="allInOne.tmp.jar"/>
        <!-- delete the temporary file -->
        <delete file="webapp/jwsallInOne.tmp.jar"/>

Stefan Baebler wrote:
> Chris Fleming wrote:
>> The best way to do this would be through java webstart... 
>> (http://java.sun.com/products/javawebstart/overview.html)
> I like the idea, so I wrote the attached josm.jnlp file, added mime
> type to my local apache
>     AddType application/x-java-jnlp-file .jnlp
> clicked on the file in my web browser. It got recognized as an Java
> application, tried to launch, but failed at MainApplication.java, line
> 64, some issue with permissions (stacktrace below*). It seems that
> code needs to be modified to require less permisions (not using local
> files, becoming less useful).
> Otherwise, adding
> <security>
>    <all-permissions/>
> </security>
> it complained that jar needs to be signed for that.
> Hope it helps.
> greets,
>     Stefan
> *full stacktrace of the first exception:
> java.security.AccessControlException: access denied
> (java.lang.RuntimePermission setDefaultUncaughtExceptionHandler)
>     at java.security.AccessControlContext.checkPermission(Unknown Source)
>     at java.security.AccessController.checkPermission(Unknown Source)
>     at java.lang.SecurityManager.checkPermission(Unknown Source)
>     at java.lang.Thread.setDefaultUncaughtExceptionHandler(Unknown
> Source)
>     at
> org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:64)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>     at java.lang.reflect.Method.invoke(Unknown Source)
>     at com.sun.javaws.Launcher.executeApplication(Unknown Source)
>     at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
>     at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
>     at com.sun.javaws.Launcher.run(Unknown Source)
>     at java.lang.Thread.run(Unknown Source)
> ------------------------------------------------------------------------
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev

Disclaimer: http://www.peralex.com/disclaimer.html

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20070524/c5cef1f0/attachment.html>

More information about the dev mailing list