From 60f9b432b0f42f48a3c2371202e132dec9bb9713 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Thu, 10 Dec 2009 17:00:49 +0000
Subject: [PATCH] Complete a potential fix for issue 4394 (Quicksetup doesn't work with openJDK 1.6 64 bits (fedora core 12))

---
 opends/src/quicksetup/org/opends/quicksetup/util/Utils.java |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java b/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
index 81feb79..21e22f8 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
@@ -99,6 +99,12 @@
   private final static String CUSTOMIZATION_CLASS_NAME =
     "org.opends.server.util.ReleaseDefinition";
 
+
+  /**
+   * The service name required by the JNLP downloader.
+   */
+  public static String JNLP_SERVICE_NAME = "javax.jnlp.DownloadService";
+
   /**
    * Enumeration that specify if the operation applies to the install directory
    * only, to the instance directory only, or both.
@@ -1801,6 +1807,30 @@
         }
       }
     }
+    if (Utils.isWebStart())
+    {
+      // Check that the JNLP service exists.
+      try
+      {
+        javax.jnlp.ServiceManager.lookup(JNLP_SERVICE_NAME);
+      }
+      catch (Throwable t)
+      {
+        String setupFile;
+        if (Utils.isWindows())
+        {
+          setupFile = Installation.WINDOWS_SETUP_FILE_NAME;
+        }
+        else
+        {
+          setupFile = Installation.UNIX_SETUP_FILE_NAME;
+        }
+        throw new IncompatibleVersionException(
+            INFO_DOWNLOADING_ERROR_NO_SERVICE_FOUND.get(
+                JNLP_SERVICE_NAME, setupFile),
+            t);
+      }
+    }
   }
 
   /**

--
Gitblit v1.10.0