From 03b30ea97b56c76514c31b7460e2b3c0594f859a Mon Sep 17 00:00:00 2001
From: fguigues <fguigues@localhost>
Date: Wed, 28 Jan 2009 07:38:52 +0000
Subject: [PATCH] Fix file sepator in the licenfile Update the classpath wit hadditional resources

---
 opends/resource/bin/_script-util.sh                          |    6 +++++-
 opends/resource/bin/_script-util.bat                         |    3 ++-
 opends/src/quicksetup/org/opends/quicksetup/LicenseFile.java |   11 ++++++++---
 3 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/opends/resource/bin/_script-util.bat b/opends/resource/bin/_script-util.bat
index e4af259..6c97354 100644
--- a/opends/resource/bin/_script-util.bat
+++ b/opends/resource/bin/_script-util.bat
@@ -22,7 +22,7 @@
 rem CDDL HEADER END
 rem
 rem
-rem      Copyright 2008 Sun Microsystems, Inc.
+rem      Copyright 2008-2009 Sun Microsystems, Inc.
 
 set SET_JAVA_HOME_AND_ARGS_DONE=false
 set SET_ENVIRONMENT_VARS_DONE=false
@@ -57,6 +57,7 @@
 
 :setClassPath
 if "%SET_CLASSPATH_DONE%" == "true" goto end
+FOR %%x in ("%INSTALL_ROOT%\resources\*.jar") DO call "%INSTALL_ROOT%\lib\setcp.bat" %%x
 FOR %%x in ("%INSTALL_ROOT%\lib\*.jar") DO call "%INSTALL_ROOT%\lib\setcp.bat" %%x
 if "%INSTALL_ROOT%" == "%INSTANCE_ROOT%"goto setClassPathDone
 FOR %%x in ("%INSTANCE_ROOT%\lib\*.jar") DO call "%INSTANCE_ROOT%\lib\setcp.bat" %%x
diff --git a/opends/resource/bin/_script-util.sh b/opends/resource/bin/_script-util.sh
index 8263497..73ebe21 100644
--- a/opends/resource/bin/_script-util.sh
+++ b/opends/resource/bin/_script-util.sh
@@ -23,7 +23,7 @@
 # CDDL HEADER END
 #
 #
-#      Copyright 2009 Sun Microsystems, Inc.
+#      Copyright 2008-2009 Sun Microsystems, Inc.
 
 #
 # function that sets the java home
@@ -146,6 +146,10 @@
 # Configure the appropriate CLASSPATH.
 set_classpath() {
   CLASSPATH=${INSTANCE_ROOT}/classes
+  for JAR in ${INSTALL_ROOT}/resources/*.jar
+  do
+    CLASSPATH=${CLASSPATH}:${JAR}
+  done
   for JAR in ${INSTALL_ROOT}/lib/*.jar
   do
     CLASSPATH=${CLASSPATH}:${JAR}
diff --git a/opends/src/quicksetup/org/opends/quicksetup/LicenseFile.java b/opends/src/quicksetup/org/opends/quicksetup/LicenseFile.java
index cbb388a..0938c62 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/LicenseFile.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/LicenseFile.java
@@ -22,7 +22,7 @@
  * CDDL HEADER END
  *
  *
- *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Copyright 2006-2009 Sun Microsystems, Inc.
  */
 
 package org.opends.quicksetup;
@@ -30,6 +30,7 @@
 import java.io.File;
 import java.io.FileReader;
 import java.io.IOException;
+import org.opends.server.core.DirectoryServer;
 
 /**
  * Represents information about the license file.
@@ -52,7 +53,7 @@
    */
   static private String getName()
   {
-    String installRootFromSystem = System.getProperty("INSTALL_ROOT");
+    String installRootFromSystem = DirectoryServer.getServerRoot();
 
     if (installRootFromSystem == null) {
       installRootFromSystem = System.getenv("INSTALL_ROOT");
@@ -62,7 +63,11 @@
       installRootFromSystem = "";
     }
 
-    return installRootFromSystem + "/Legal/license_to_accept.txt";
+    return installRootFromSystem +
+            File.pathSeparator +
+            "Legal" +
+            File.pathSeparator +
+            "license_to_accept.txt";
   }
 
   /**

--
Gitblit v1.10.0