Index: trunk/src/org/openstreetmap/josm/data/projection/Puwg.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/Puwg.java	(revision 3231)
+++ trunk/src/org/openstreetmap/josm/data/projection/Puwg.java	(revision 3232)
@@ -123,5 +123,5 @@
     public Collection<String> getPreferencesFromCode(String code)
     {
-        for (Projection p : Puwg.Zones)
+        for (PuwgData p : Puwg.Zones)
         {
             if(code.equals(p.toCode()))
@@ -151,10 +151,15 @@
 }
 
-interface PuwgData extends Projection {
-    public double getPuwgCentralMeridianDeg();
-    public double getPuwgCentralMeridian();
-    public double getPuwgFalseEasting();
-    public double getPuwgFalseNorthing();
-    public double getPuwgScaleFactor();
+interface PuwgData {
+    double getPuwgCentralMeridianDeg();
+    double getPuwgCentralMeridian();
+    double getPuwgFalseEasting();
+    double getPuwgFalseNorthing();
+    double getPuwgScaleFactor();
+
+    // Projection methods
+    String toCode();
+    String getCacheDirectoryName();
+    Bounds getWorldBoundsLatLon();
 }
 
@@ -165,5 +170,4 @@
     private static final double Epsg2180ScaleFactor = 0.9993;
     private static final double Epsg2180CentralMeridian = 19.0;
-    private static DecimalFormat decFormatter = new DecimalFormat("###0");
 
     @Override public String toString() {
@@ -185,8 +189,4 @@
                 new LatLon(54.84, 24.15));
     }
-
-    /* These two MUST NOT be used. Use Puwg implementation instead. */
-    public EastNorth latlon2eastNorth(LatLon p) { return null; }
-    public LatLon eastNorth2latlon(EastNorth p) { return null; }
 
     public double getPuwgCentralMeridianDeg() { return Epsg2180CentralMeridian; }
@@ -195,17 +195,4 @@
     public double getPuwgFalseNorthing() { return Epsg2180FalseNorthing; }
     public double getPuwgScaleFactor() { return Epsg2180ScaleFactor; }
-
-    public double getDefaultZoomInPPD() {
-        // This will set the scale bar to about 100 km
-        return 0.009;
-    }
-
-    public String eastToString(EastNorth p) {
-        return decFormatter.format(p.east());
-    }
-
-    public String northToString(EastNorth p) {
-        return decFormatter.format(p.north());
-    }
 }
 
@@ -218,5 +205,4 @@
     final private String[] Puwg2000Code = { "EPSG:2176",  "EPSG:2177", "EPSG:2178", "EPSG:2179"};
     final private String[] Puwg2000CDName = { "epsg2176",  "epsg2177", "epsg2178", "epsg2179"};
-    private static DecimalFormat decFormatter = new DecimalFormat("###0.00");
 
     @Override public String toString() {
@@ -238,8 +224,4 @@
                 new LatLon(54.84, (3 * getZone()) + 1.5));
     }
-
-    /* These two MUST NOT be used. Use Puwg implementation instead. */
-    public EastNorth latlon2eastNorth(LatLon p) { return null; }
-    public LatLon eastNorth2latlon(EastNorth p) { return null; }
 
     public double getPuwgCentralMeridianDeg() { return getZone() * 3.0; }
@@ -252,20 +234,7 @@
     public int getZoneIndex() { return getZone() - 5; }
 
-    public double getDefaultZoomInPPD() {
-        // This will set the scale bar to about 100 km
-        return 0.009;
-    }
-
-    public String eastToString(EastNorth p) {
-        return Integer.toString(getZone()) + decFormatter.format(p.east());
-    }
-
-    public String northToString(EastNorth p) {
-        return decFormatter.format(p.north());
-    }
-
-}
-
-class Epsg2176 extends Puwg2000 implements Projection {
+}
+
+class Epsg2176 extends Puwg2000 {
     private static final int PuwgZone = 5;
 
@@ -274,5 +243,5 @@
 }
 
-class Epsg2177 extends Puwg2000 implements Projection {
+class Epsg2177 extends Puwg2000 {
     private static final int PuwgZone = 6;
 
@@ -281,5 +250,5 @@
 }
 
-class Epsg2178 extends Puwg2000 implements Projection {
+class Epsg2178 extends Puwg2000 {
     private static final int PuwgZone = 7;
 
@@ -288,5 +257,5 @@
 }
 
-class Epsg2179 extends Puwg2000 implements Projection {
+class Epsg2179 extends Puwg2000 {
     private static final int PuwgZone = 8;
 
Index: trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 3231)
+++ trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 3232)
@@ -11,4 +11,9 @@
 import java.net.Authenticator;
 import java.net.ProxySelector;
+import java.security.AllPermission;
+import java.security.CodeSource;
+import java.security.PermissionCollection;
+import java.security.Permissions;
+import java.security.Policy;
 import java.util.Collection;
 import java.util.HashMap;
@@ -130,4 +135,22 @@
         I18n.init();
 
+        Policy.setPolicy(new Policy() {
+            // Permissions for plug-ins loaded when josm is started via webstart
+            private PermissionCollection pc;
+
+            {
+                pc = new Permissions();
+                pc.add(new AllPermission());
+            }
+
+            @Override
+            public void refresh() { }
+
+            @Override
+            public PermissionCollection getPermissions(CodeSource codesource) {
+                return pc;
+            }
+        });
+
         Thread.setDefaultUncaughtExceptionHandler(new BugReportExceptionHandler());
         // http://stuffthathappens.com/blog/2007/10/15/one-more-note-on-uncaught-exception-handlers/
Index: trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 3231)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 3232)
@@ -63,5 +63,5 @@
  * PluginHandler is basically a collection of static utility functions used to bootstrap
  * and manage the loaded plugins.
- * 
+ *
  */
 public class PluginHandler {
@@ -84,7 +84,7 @@
      * Removes deprecated plugins from a collection of plugins. Modifies the
      * collection <code>plugins</code>.
-     * 
+     *
      * Also notifies the user about removed deprecated plugins
-     * 
+     *
      * @param plugins the collection of plugins
      */
@@ -128,7 +128,7 @@
      * collection <code>plugins</code>. Also removes the plugin from the list
      * of plugins in the preferences, if necessary.
-     * 
+     *
      * Asks the user for every unmaintained plugin whether it should be removed.
-     * 
+     *
      * @param plugins the collection of plugins
      */
@@ -153,5 +153,5 @@
      * JOSM was updated to a new version since the last plugin updates or
      * if the plugins were last updated a long time ago.
-     * 
+     *
      * @param parent the parent window relative to which the confirmation dialog
      * is to be displayed
@@ -261,5 +261,5 @@
     /**
      * Alerts the user if a plugin required by another plugin is missing
-     * 
+     *
      * @param plugin the the plugin
      * @param missingRequiredPlugin the missing required plugin
@@ -304,5 +304,5 @@
      * current JOSM version must be compatible with the plugin and no other plugins this plugin
      * depends on should be missing.
-     * 
+     *
      * @param plugins the collection of all loaded plugins
      * @param plugin the plugin for which preconditions are checked
@@ -342,5 +342,5 @@
     /**
      * Creates a class loader for loading plugin code.
-     * 
+     *
      * @param plugins the collection of plugins which are going to be loaded with this
      * class loader
@@ -371,5 +371,5 @@
      * Loads and instantiates the plugin described by <code>plugin</code> using
      * the class loader <code>pluginClassLoader</code>.
-     * 
+     *
      * @param plugin the plugin
      * @param pluginClassLoader the plugin class loader
@@ -383,6 +383,6 @@
             }
         } catch(PluginException e) {
+            e.printStackTrace();
             if (e.getCause() instanceof ClassNotFoundException) {
-                e.printStackTrace();
                 String msg = tr("<html>Could not load plugin {0} because the plugin<br>main class ''{1}'' was not found.<br>"
                         + "Delete from preferences?", plugin.name, plugin.className);
@@ -403,5 +403,5 @@
      * Loads the plugin in <code>plugins</code> from locally available jar files into
      * memory.
-     * 
+     *
      * @param plugins the list of plugins
      * @param monitor the progress monitor. Defaults to {@see NullProgressMonitor#INSTANCE} if null.
@@ -452,5 +452,5 @@
      * Loads plugins from <code>plugins</code> which have the flag {@see PluginInformation#early}
      * set to true.
-     * 
+     *
      * @param plugins the collection of plugins
      * @param monitor the progress monitor. Defaults to {@see NullProgressMonitor#INSTANCE} if null.
@@ -469,5 +469,5 @@
      * Loads plugins from <code>plugins</code> which have the flag {@see PluginInformation#early}
      * set to false.
-     * 
+     *
      * @param plugins the collection of plugins
      * @param monitor the progress monitor. Defaults to {@see NullProgressMonitor#INSTANCE} if null.
@@ -489,5 +489,5 @@
      * @param monitor the progress monitor. Defaults to {@see NullProgressMonitor#INSTANCE} if null.
      * @return the list of locally available plugin information
-     * 
+     *
      */
     private static Map<String, PluginInformation> loadLocallyAvailablePluginInformation(ProgressMonitor monitor) {
@@ -614,5 +614,5 @@
     /**
      * Updates the plugins in <code>plugins</code>.
-     * 
+     *
      * @param parent the parent window for message boxes
      * @param plugins the collection of plugins to update. Must not be null.
@@ -696,5 +696,5 @@
     /**
      * Ask the user for confirmation that a plugin shall be disabled.
-     * 
+     *
      * @param reason the reason for disabling the plugin
      * @param name the plugin name
@@ -731,5 +731,5 @@
     /**
      * Notified loaded plugins about a new map frame
-     * 
+     *
      * @param old the old map frame
      * @param map the new map frame
@@ -763,9 +763,9 @@
      * Installs downloaded plugins. Moves files with the suffix ".jar.new" to the corresponding
      * ".jar" files.
-     * 
+     *
      * If {@code dowarn} is true, this methods emits warning messages on the console if a downloaded
      * but not yet installed plugin .jar can't be be installed. If {@code dowarn} is false, the
      * installation of the respective plugin is sillently skipped.
-     * 
+     *
      * @param dowarn if true, warning messages are displayed; false otherwise
      */
@@ -843,5 +843,5 @@
     /**
      * Replies the plugin which most likely threw the exception <code>ex</code>.
-     * 
+     *
      * @param ex the exception
      * @return the plugin; null, if the exception proably wasn't thrown from a plugin
@@ -864,5 +864,5 @@
      * Checks whether the exception <code>e</code> was thrown by a plugin. If so,
      * conditionally deactivates the plugin, but asks the user first.
-     * 
+     *
      * @param e the exception
      */
@@ -914,5 +914,5 @@
             String version = pp.getPluginInformation().localversion;
             text += version != null && !version.equals("") ? " (Version: " + version + ")\n"
-                        : "\n";
+                    : "\n";
         }
         return text;
