Menu

#465 Start scripts dont support paths with spaces

scheduled_for_2.0
closed
5
2012-07-18
2005-12-23
drekbour
No

Using the Windows .bat from 2.0-pre2 as example, it
should be written thus (just do a diff). This isn't so
much of a problem on Linux as spaces don't usually
appear in non-user paths.

@echo off

SET GP_HOME=.

SET JAVA_COMMAND=%JAVA_HOME%\bin\java.exe
IF "%JAVA_HOME%"=="" SET JAVA_COMMAND=java

SET LOCAL_CLASSPATH=%GP_HOME%\eclipsito.jar

SET
CONFIGURATION_FILE=%GP_HOME%\ganttproject-eclipsito-config.xml
SET BOOT_CLASS=org.bardsoftware.eclipsito.Boot

%JAVA_COMMAND% -Xmx256m -classpath
"%CLASSPATH%;%LOCAL_CLASSPATH%" %BOOT_CLASS%
"%CONFIGURATION_FILE%" %1 %2 %3 %4 %5 %6

goto END

:ERROR_NO_JAVA
echo "Please set up JAVA_HOME variable"

:END

Discussion

  • drekbour

    drekbour - 2005-12-23

    Logged In: YES
    user_id=911849

    I also took out the exit statements but didn't actually
    finish the job, add :
    if %ERRORLEVEL% EQU 9009 goto ERROR_NO_JAVA

     
  • drekbour

    drekbour - 2005-12-23

    Logged In: YES
    user_id=911849

    and the final one, while I remember
    %JAVA_COMMAND% -Xmx256m ...
    should read
    "%JAVA_COMMAND%" -Xmx256m

     
  • Stephen Gordon

    Stephen Gordon - 2005-12-28

    Logged In: YES
    user_id=843532

    Yep, this definitely needs fixing....