You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by do...@apache.org on 2001/03/28 05:15:24 UTC

cvs commit: jakarta-avalon-phoenix/src/script run.sh run.bat

donaldp     01/03/27 19:15:24

  Modified:    src/script run.sh run.bat
  Log:
  Updated both of the scripts to set java.ext.dirs to <base>/lib.
  
  This should fix the problem with ext dirs interferring with actuall running of JVM and also allow a pool of system wide code to be used.
  
  Revision  Changes    Path
  1.3       +36 -1     jakarta-avalon-phoenix/src/script/run.sh
  
  Index: run.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/script/run.sh,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- run.sh	2001/02/24 04:59:35	1.2
  +++ run.sh	2001/03/28 03:15:21	1.3
  @@ -1,5 +1,15 @@
   #! /bin/sh
  +#
  +# Phoenix start script.
  +#
  +# Author: Peter Donald <do...@apache.org>
  +#
  +# The user may choose to supply parameters to the JVM (such as memory settings)
  +# via setting the environment variable PHOENIX_JVM_OPTS
  +#
   
  +# Checking for JAVA_HOME is required on *nix due
  +# to some distributions stupidly including kaffe in /usr/bin
   if [ "$JAVA_HOME" = "" ] ; then
     echo "ERROR: JAVA_HOME not found in your environment."
     echo
  @@ -8,4 +18,29 @@
     exit 1
   fi
   
  -$JAVA_HOME/bin/java $PHOENIX_JVM_OPTS -jar phoenix-loader.jar $*
  +#
  +# Locate where phoenix is in filesystem
  +#
  +THIS_PROG=`dirname $0`
  +
  +if [ "$THIS_PROG" = "." ] ; then
  +  THIS_PROG=$PWD
  +fi
  +
  +PHOENIX_HOME=$THIS_PROG/..
  +unset THIS_PROG
  +
  +# echo "Home directory: $PHOENIX_HOME"
  +# echo "Home ext directory: $PHOENIX_HOME/lib"
  +
  +#
  +# Command to overide JVM ext dir
  +#
  +# This is needed as some JVM vendors do foolish things
  +# like placing jaxp/jaas/xml-parser jars in ext dir
  +# thus breaking Phoenix
  +#
  +JVM_OPTS="-Djava.ext.dirs=$PHOENIX_HOME/lib $PHOENIX_JVM_OPTS"
  +
  +# Kicking the tires and lighting the fires!!!
  +$JAVA_HOME/bin/java $JVM_OPTS -jar $PHOENIX_HOME/bin/phoenix-loader.jar $*
  
  
  
  1.3       +58 -1     jakarta-avalon-phoenix/src/script/run.bat
  
  Index: run.bat
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/script/run.bat,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- run.bat	2001/02/24 04:59:35	1.2
  +++ run.bat	2001/03/28 03:15:22	1.3
  @@ -1,3 +1,60 @@
   @echo off
  +rem
  +rem Phoenix start script.
  +rem
  +rem Author: Peter Donald [donaldp@apache.org]
  +rem
  +rem The user may choose to supply parameters to the JVM (such as memory settings)
  +rem via setting the environment variable PHOENIX_JVM_OPTS
  +rem
   
  -java %PHOENIX_JVM_OPTS% -jar phoenix-loader.jar %1 %2 %3 %4 %5 %6 %7 %8 %9
  \ No newline at end of file
  +rem
  +rem Determine if JAVA_HOME is set and if so then use it
  +rem
  +if not "%JAVA_HOME%"=="" goto found_java
  +
  +set PHOENIX_JAVACMD=java
  +goto file_locate
  +
  +:found_java
  +set PHOENIX_JAVACMD=%JAVA_HOME%\bin\java
  +
  +:file_locate
  +
  +rem
  +rem Locate where phoenix is in filesystem
  +rem
  +if not "%OS%"=="Windows_NT" goto start
  +
  +rem %~dp0 is name of current script under NT
  +set PHOENIX_HOME=%~dp0
  +
  +rem : operator works similar to make : operator
  +set PHOENIX_HOME=%PHOENIX_HOME:\bin\=%
  +
  +:start
  +
  +if not "%PHOENIX_HOME%" == "" goto phoenix_home
  +
  +echo.
  +echo Warning: PHOENIX_HOME environment variable is not set.
  +echo   This needs to be set for Win9x as it's command prompt 
  +echo   scripting bites
  +echo.
  +goto end
  +
  +:phoenix_home
  +
  +rem echo "Home directory: %PHOENIX_HOME%"
  +rem echo "Home ext directory: %PHOENIX_HOME%\lib"
  +
  +rem
  +rem This is needed as some JVM vendors do foolish things
  +rem like placing jaxp/jaas/xml-parser jars in ext dir
  +rem thus breaking Phoenix
  +rem
  +
  +rem Kicking the tires and lighting the fires!!!
  +%PHOENIX_JAVACMD% -Djava.ext.dirs=%PHOENIX_HOME%\lib %PHOENIX_JVM_OPTS% -jar %PHOENIX_HOME%\bin\phoenix-loader.jar %1 %2 %3 %4 %5 %6 %7 %8 %9
  +
  +:end
  \ No newline at end of file
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-avalon-phoenix/src/script run.sh run.bat

Posted by Peter Donald <do...@apache.org>.
At 09:17  28/3/01 +0100, Charles Benett wrote:
>How does this work with jsse? Assuming we still can't bundle it with
>phoenix, I'd expect users to install it in the default ext dir.

Essentially they will have to place it either in

<base>/lib/*.jar
or
<base>/apps/<myapp>/lib/*.jar


Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-avalon-phoenix/src/script run.sh run.bat

Posted by Charles Benett <Ch...@benett1.demon.co.uk>.
How does this work with jsse? Assuming we still can't bundle it with
phoenix, I'd expect users to install it in the default ext dir.
Charles

donaldp@apache.org wrote:
> 
> donaldp     01/03/27 19:15:24
> 
>   Modified:    src/script run.sh run.bat
>   Log:
>   Updated both of the scripts to set java.ext.dirs to <base>/lib.
> 
>   This should fix the problem with ext dirs interferring with actuall running of JVM and also allow a pool of system wide code to be used.
> 
>   Revision  Changes    Path
>   1.3       +36 -1     jakarta-avalon-phoenix/src/script/run.sh
> 
>   Index: run.sh
>   ===================================================================
>   RCS file: /home/cvs/jakarta-avalon-phoenix/src/script/run.sh,v
>   retrieving revision 1.2
>   retrieving revision 1.3
>   diff -u -r1.2 -r1.3
>   --- run.sh    2001/02/24 04:59:35     1.2
>   +++ run.sh    2001/03/28 03:15:21     1.3
>   @@ -1,5 +1,15 @@
>    #! /bin/sh
>   +#
>   +# Phoenix start script.
>   +#
>   +# Author: Peter Donald <do...@apache.org>
>   +#
>   +# The user may choose to supply parameters to the JVM (such as memory settings)
>   +# via setting the environment variable PHOENIX_JVM_OPTS
>   +#
> 
>   +# Checking for JAVA_HOME is required on *nix due
>   +# to some distributions stupidly including kaffe in /usr/bin
>    if [ "$JAVA_HOME" = "" ] ; then
>      echo "ERROR: JAVA_HOME not found in your environment."
>      echo
>   @@ -8,4 +18,29 @@
>      exit 1
>    fi
> 
>   -$JAVA_HOME/bin/java $PHOENIX_JVM_OPTS -jar phoenix-loader.jar $*
>   +#
>   +# Locate where phoenix is in filesystem
>   +#
>   +THIS_PROG=`dirname $0`
>   +
>   +if [ "$THIS_PROG" = "." ] ; then
>   +  THIS_PROG=$PWD
>   +fi
>   +
>   +PHOENIX_HOME=$THIS_PROG/..
>   +unset THIS_PROG
>   +
>   +# echo "Home directory: $PHOENIX_HOME"
>   +# echo "Home ext directory: $PHOENIX_HOME/lib"
>   +
>   +#
>   +# Command to overide JVM ext dir
>   +#
>   +# This is needed as some JVM vendors do foolish things
>   +# like placing jaxp/jaas/xml-parser jars in ext dir
>   +# thus breaking Phoenix
>   +#
>   +JVM_OPTS="-Djava.ext.dirs=$PHOENIX_HOME/lib $PHOENIX_JVM_OPTS"
>   +
>   +# Kicking the tires and lighting the fires!!!
>   +$JAVA_HOME/bin/java $JVM_OPTS -jar $PHOENIX_HOME/bin/phoenix-loader.jar $*
> 
> 
> 
>   1.3       +58 -1     jakarta-avalon-phoenix/src/script/run.bat
> 
>   Index: run.bat
>   ===================================================================
>   RCS file: /home/cvs/jakarta-avalon-phoenix/src/script/run.bat,v
>   retrieving revision 1.2
>   retrieving revision 1.3
>   diff -u -r1.2 -r1.3
>   --- run.bat   2001/02/24 04:59:35     1.2
>   +++ run.bat   2001/03/28 03:15:22     1.3
>   @@ -1,3 +1,60 @@
>    @echo off
>   +rem
>   +rem Phoenix start script.
>   +rem
>   +rem Author: Peter Donald [donaldp@apache.org]
>   +rem
>   +rem The user may choose to supply parameters to the JVM (such as memory settings)
>   +rem via setting the environment variable PHOENIX_JVM_OPTS
>   +rem
> 
>   -java %PHOENIX_JVM_OPTS% -jar phoenix-loader.jar %1 %2 %3 %4 %5 %6 %7 %8 %9
>   \ No newline at end of file
>   +rem
>   +rem Determine if JAVA_HOME is set and if so then use it
>   +rem
>   +if not "%JAVA_HOME%"=="" goto found_java
>   +
>   +set PHOENIX_JAVACMD=java
>   +goto file_locate
>   +
>   +:found_java
>   +set PHOENIX_JAVACMD=%JAVA_HOME%\bin\java
>   +
>   +:file_locate
>   +
>   +rem
>   +rem Locate where phoenix is in filesystem
>   +rem
>   +if not "%OS%"=="Windows_NT" goto start
>   +
>   +rem %~dp0 is name of current script under NT
>   +set PHOENIX_HOME=%~dp0
>   +
>   +rem : operator works similar to make : operator
>   +set PHOENIX_HOME=%PHOENIX_HOME:\bin\=%
>   +
>   +:start
>   +
>   +if not "%PHOENIX_HOME%" == "" goto phoenix_home
>   +
>   +echo.
>   +echo Warning: PHOENIX_HOME environment variable is not set.
>   +echo   This needs to be set for Win9x as it's command prompt
>   +echo   scripting bites
>   +echo.
>   +goto end
>   +
>   +:phoenix_home
>   +
>   +rem echo "Home directory: %PHOENIX_HOME%"
>   +rem echo "Home ext directory: %PHOENIX_HOME%\lib"
>   +
>   +rem
>   +rem This is needed as some JVM vendors do foolish things
>   +rem like placing jaxp/jaas/xml-parser jars in ext dir
>   +rem thus breaking Phoenix
>   +rem
>   +
>   +rem Kicking the tires and lighting the fires!!!
>   +%PHOENIX_JAVACMD% -Djava.ext.dirs=%PHOENIX_HOME%\lib %PHOENIX_JVM_OPTS% -jar %PHOENIX_HOME%\bin\phoenix-loader.jar %1 %2 %3 %4 %5 %6 %7 %8 %9
>   +
>   +:end
>   \ No newline at end of file
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: avalon-dev-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org