Index: trunk/src/org/openstreetmap/josm/Main.java
===================================================================
--- trunk/src/org/openstreetmap/josm/Main.java	(revision 6442)
+++ trunk/src/org/openstreetmap/josm/Main.java	(revision 6443)
@@ -975,5 +975,6 @@
             if (version.startsWith("1.6") || version.startsWith("6") ||
                     version.startsWith("1.7") || version.startsWith("7") ||
-                    version.startsWith("1.8") || version.startsWith("8"))
+                    version.startsWith("1.8") || version.startsWith("8") ||
+                    version.startsWith("1.9") || version.startsWith("9"))
                 return;
             if (version.startsWith("1.5") || version.startsWith("5")) {
Index: trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 6442)
+++ trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 6443)
@@ -272,5 +272,5 @@
     public ExtendedDialog showDialog() {
         // Check if the user has set the dialog to not be shown again
-        if (toggleCheckState(togglePref)) {
+        if (toggleCheckState()) {
             result = toggleValue;
             return this;
@@ -595,12 +595,11 @@
      * @return true if dialog should not be shown again
      */
-    private boolean toggleCheckState(String togglePref) {
+    public final boolean toggleCheckState() {
         toggleable = togglePref != null && !togglePref.isEmpty();
 
         toggleValue = Main.pref.getInteger("message."+togglePref+".value", -1);
         // No identifier given, so return false (= show the dialog)
-        if(!toggleable || toggleValue == -1)
+        if (!toggleable || toggleValue == -1)
             return false;
-        this.togglePref = togglePref;
         // The pref is true, if the dialog should be shown.
         return !(Main.pref.getBoolean("message."+ togglePref, true));
Index: trunk/src/org/openstreetmap/josm/tools/PlatformHook.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/PlatformHook.java	(revision 6442)
+++ trunk/src/org/openstreetmap/josm/tools/PlatformHook.java	(revision 6443)
@@ -6,25 +6,10 @@
 
 /**
- * This interface allows platfrom (operating system) dependent code
+ * This interface allows platform (operating system) dependent code
  * to be bundled into self-contained classes.
- *
- * For plugin authors:
- * To implement your own PlatformHook class, implement this interface,
- * then create the class when your plugin is loaded and store it in
- * Main.platform. Please not that the two "startup" hooks will be
- * called _before_ your plugin is loaded. If you need to hook there,
- * split your class into two (one containing only the startup hooks,
- * and one with the remainder) and send the startup class, together
- * with propper OS detection code (see Main) for inclusion with
- * JOSM to the JOSM team.
- *
- * Also, it might be a good idea to extend PlatformHookUnixoid.
- * That class has a more or less neutral behaviour, that should
- * work on all platforms supported by J2SE.
- *
- * Attention: At this time this interface is not to be considered
- * complete.
+ * @since 1023
  */
 public interface PlatformHook {
+    
     /**
       * The preStartupHook will be called extremly early. It is
@@ -32,6 +17,5 @@
       *
       * Reason: On OSX we need to inform the Swing libraries
-      * that we want to be integrated with the OS before we setup
-      * our GUI.
+      * that we want to be integrated with the OS before we setup our GUI.
       */
     public void preStartupHook();
@@ -48,5 +32,7 @@
     /**
       * The openURL hook will be used to open an URL in the
-      * default webbrowser.
+      * default web browser.
+     * @param url The URL to open
+     * @throws IOException if any I/O error occurs
       */
     public void openUrl(String url) throws IOException;
@@ -79,16 +65,33 @@
       *
       * Tooltips are usually not system dependent, unless the
-      * JVM is to dumb to provide correct names for all the keys.
+      * JVM is too dumb to provide correct names for all the keys.
       *
       * Another reason not to use the implementation in the *nix
-      * hook are LAFs that don't understand HTML, such as the OSX
-      * LAFs.
+      * hook are LAFs that don't understand HTML, such as the OSX LAFs.
+      * 
+     * @param name Tooltip text to display 
+     * @param sc Shortcut associated (to display accelerator between parenthesis)
+     * @return Full tooltip text (name + accelerator)
       */
     public String makeTooltip(String name, Shortcut sc);
 
+    /**
+     * Returns the default LAF to be used on this platform to look almost as a native application.
+     * @return The default native LAF for this platform
+     */
     public String getDefaultStyle();
 
+    /**
+     * Determines if the platform allows full-screen.
+     * @return {@code true} if full screen is allowed, {@code false} otherwise
+     */
     public boolean canFullscreen();
 
+    /**
+     * Renames a file.
+     * @param from Source file
+     * @param to Target file
+     * @return {@code true} if the file has been renamed, {@code false} otherwise
+     */
     public boolean rename(File from, File to);
 
Index: trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java	(revision 6442)
+++ trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java	(revision 6443)
@@ -15,16 +15,20 @@
 
 /**
- * @see PlatformHook
+ * {@code PlatformHook} implementation for Apple Mac OS X systems.
+ * @since 1023
  */
 public class PlatformHookOsx extends PlatformHookUnixoid implements PlatformHook, InvocationHandler {
+    
     private static PlatformHookOsx ivhandler = new PlatformHookOsx();
-    @Override
-    public void preStartupHook(){
+    
+    @Override
+    public void preStartupHook() {
         // This will merge our MenuBar into the system menu.
         // MUST be set before Swing is initialized!
-        // And will not work when one of the system independet LAFs is used.
+        // And will not work when one of the system independent LAFs is used.
         // They just insist on painting themselves...
         System.setProperty("apple.laf.useScreenMenuBar", "true");
     }
+    
     @Override
     public void startupHook() {
@@ -44,4 +48,5 @@
         }
     }
+    
     @Override
     public Object invoke (Object proxy, Method method, Object[] args) throws Throwable {
@@ -64,4 +69,5 @@
         return null;
     }
+    
     @Override
     public void openUrl(String url) throws IOException {
@@ -71,5 +77,4 @@
     @Override
     public void initSystemShortcuts() {
-        // Yeah, it's a long, long list. And people always complain that OSX has no shortcuts.
         Shortcut.registerSystemShortcut("apple-reserved-01", tr("reserved"), KeyEvent.VK_SPACE, KeyEvent.META_DOWN_MASK).setAutomatic(); // Show or hide the Spotlight search field (when multiple languages are installed, may rotate through enabled script systems).
         Shortcut.registerSystemShortcut("apple-reserved-02", tr("reserved"), KeyEvent.VK_SPACE, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Apple reserved.
@@ -207,4 +212,5 @@
         Shortcut.registerSystemShortcut("view:zoomout", tr("reserved"), KeyEvent.VK_SUBTRACT, KeyEvent.META_DOWN_MASK); // Zoom out
     }
+    
     @Override
     public String makeTooltip(String name, Shortcut sc) {
@@ -237,18 +243,13 @@
 
     @Override
-    public String getDefaultStyle()
-    {
+    public String getDefaultStyle() {
         return "javax.swing.plaf.metal.MetalLookAndFeel";
     }
 
     @Override
-    public boolean canFullscreen()
-    {
+    public boolean canFullscreen() {
         return false;
     }
 
-    /* (non-Javadoc)
-     * @see org.openstreetmap.josm.tools.PlatformHookUnixoid#getOSDescription()
-     */
     @Override
     public String getOSDescription() {
Index: trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java	(revision 6442)
+++ trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java	(revision 6443)
@@ -4,4 +4,5 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
+import java.awt.Dimension;
 import java.awt.GraphicsEnvironment;
 import java.awt.event.KeyEvent;
@@ -13,5 +14,8 @@
 import java.util.Arrays;
 
+import javax.swing.JOptionPane;
+
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.gui.ExtendedDialog;
 
 /**
@@ -28,5 +32,5 @@
 
     @Override
-    public void preStartupHook(){
+    public void preStartupHook() {
     }
 
@@ -56,4 +60,5 @@
         Shortcut.registerSystemShortcut("system:resetX", tr("reserved"), KeyEvent.VK_BACK_SPACE, KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic();
     }
+    
     /**
      * This should work for all platforms. Yeah, should.
@@ -82,6 +87,5 @@
 
     @Override
-    public boolean canFullscreen()
-    {
+    public boolean canFullscreen() {
         return GraphicsEnvironment.getLocalGraphicsEnvironment()
         .getDefaultScreenDevice().isFullScreenSupported();
@@ -89,6 +93,5 @@
 
     @Override
-    public boolean rename(File from, File to)
-    {
+    public boolean rename(File from, File to) {
         return from.renameTo(to);
     }
@@ -263,3 +266,28 @@
         }
     }
+    
+    protected void askUpdateJava(String version) {
+        try {
+            ExtendedDialog ed = new ExtendedDialog(
+                    Main.parent,
+                    tr("Outdated Java version"),
+                    new String[]{tr("Update Java"), tr("Cancel")});
+            // Check if the dialog has not already been permanently hidden by user
+            if (!ed.toggleEnable("askUpdateJava7").toggleCheckState()) {
+                ed.setButtonIcons(new String[]{"java.png", "cancel.png"}).setCancelButton(2);
+                ed.setMinimumSize(new Dimension(460, 260));
+                ed.setIcon(JOptionPane.WARNING_MESSAGE);
+                ed.setContent(tr("You are running version {0} of Java.", "<b>"+version+"</b>")+"<br><br>"+
+                        "<b>"+tr("This version is no longer supported by {0} since {1} and is not recommended for use.", "Oracle", tr("February 2013"))+"</b><br><br>"+
+                        "<b>"+tr("JOSM will soon stop working with this version; we highly recommend you to update to Java {0}.", "7")+"</b><br><br>"+
+                        tr("Would you like to update now ?"));
+   
+                if (ed.showDialog().getValue() == 1) {
+                    openUrl("http://www.java.com/download");
+                }
+            }
+        } catch (IOException e) {
+            Main.warn(e);
+        }
+    }
 }
Index: trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java	(revision 6442)
+++ trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java	(revision 6443)
@@ -32,7 +32,20 @@
 
 /**
-  * see PlatformHook.java
+  * {@code PlatformHook} implementation for Microsoft Windows systems.
+  * @since 1023
   */
 public class PlatformHookWindows extends PlatformHookUnixoid implements PlatformHook {
+    
+    @Override
+    public void startupHook() {
+        super.startupHook();
+        // Invite users to install Oracle Java 7 if they are still with Sun/Oracle Java 6
+        String vendor = System.getProperty("java.vendor");
+        String version = System.getProperty("java.version");
+        if ("Sun Microsystems Inc.".equals(vendor) && version != null && version.startsWith("1.6")) {
+            askUpdateJava(version);
+        }
+    }
+
     @Override
     public void openUrl(String url) throws IOException {
@@ -111,20 +124,15 @@
 
     @Override
-    public String getDefaultStyle()
-    {
+    public String getDefaultStyle() {
         return "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
     }
 
     @Override
-    public boolean rename(File from, File to)
-    {
-        if(to.exists())
+    public boolean rename(File from, File to) {
+        if (to.exists())
             to.delete();
         return from.renameTo(to);
     }
 
-    /* (non-Javadoc)
-     * @see org.openstreetmap.josm.tools.PlatformHookUnixoid#getOSDescription()
-     */
     @Override
     public String getOSDescription() {
