Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java	(revision 5892)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java	(revision 5893)
@@ -2,5 +2,5 @@
 package org.openstreetmap.josm.io.remotecontrol;
 
-import static org.openstreetmap.josm.tools.I18n.tr;
+import static org.openstreetmap.josm.tools.I18n.marktr;
 
 import java.io.IOException;
@@ -10,4 +10,6 @@
 import java.net.SocketException;
 import java.net.InetAddress;
+
+import org.openstreetmap.josm.Main;
 
 /**
@@ -34,9 +36,9 @@
             stopRemoteControlHttpServer();
 
-            instance = new RemoteControlHttpServer(DEFAULT_PORT);
+            instance = new RemoteControlHttpServer(Main.pref.getInteger("remote.control.port", DEFAULT_PORT));
             instance.start();
         } catch (BindException ex) {
-            System.err.println(tr("Warning: Cannot start remotecontrol server on port {0}: {1}",
-                    Integer.toString(DEFAULT_PORT), ex.getLocalizedMessage()));
+            Main.warn(marktr("Warning: Cannot start remotecontrol server on port {0}: {1}"),
+                    Integer.toString(DEFAULT_PORT), ex.getLocalizedMessage());
         } catch (IOException ioe) {
             ioe.printStackTrace();
@@ -72,6 +74,7 @@
         // Also make sure we only listen
         // on the local interface so nobody from the outside can connect!
+        // NOTE: On a dual stack machine with old Windows OS this may not listen on both interfaces!
         this.server = new ServerSocket(port, 1,
-            InetAddress.getByAddress(new byte[] { 127, 0, 0, 1 }));
+            InetAddress.getByName(Main.pref.get("remote.control.host", "localhost")));
     }
 
@@ -81,5 +84,6 @@
     public void run()
     {
-        System.out.println("RemoteControl::Accepting connections on port " + server.getLocalPort());
+        Main.info(marktr("RemoteControl::Accepting connections on port {0}"),
+             Integer.toString(server.getLocalPort()));
         while (true)
         {
@@ -109,5 +113,5 @@
     {
         server.close();
-        System.out.println("RemoteControl::Server stopped.");
+        Main.info(marktr("RemoteControl::Server stopped."));
     }
 }
