I had the same problem on a the same Win7 64 bits with 32 bit Java.
IIRC, the solution was to add double quotes to %JAVA_HOME%:
set IZPACK_JAVA="%JAVA_HOME%"
I'll check that at work on monday.
Erwan
Le 30/12/2011 11:31, Ben Stover a écrit :
> I have a 64bit Win7 where I installed Java JDK in folder C:\Program Files (x86)\Java
> which is the default folder for 32bit programs in 64bit Win7.
>
> Now I downloaded and extracted squirrel v3.3.0 plain standard and started squirrel-sql.bat as
>
> squirrel-sql.bat --user-settings-dir D:\database\squirrel\myset
>
> The batch procedure which is provided seems to have a lot of trouble with dealing with JAVA installation folders containing brackets like ( and ).
>
> The mess starts in the first statement when
>
> set IZPACK_JAVA=%JAVA_HOME%
> is evaluated to
> set IZPACK_JAVA=C:\Program Files (x86)\Java\jdk
>
> At first the batch script aborts and tells me
>
> \Java\jdk\v1.6.x\bin\javaw.exe was unexpected at this time.
>
> because set LOCAL_JAVA="%IZPACK_JAVA%\bin\javaw.exe" in line 13 is interpreting the closing ")" as close of the if statement.
>
> When I change the statement to
>
> set LOCAL_JAVA="%IZPACK_JAVA%\bin\javaw.exe"
>
> (which prevents evaluating the closing ")") then the next abort shows up:
>
> '""C:\Program' is not recognized as an internal or external command,
>
> because of
>
> "%LOCAL_JAVA%" -cp "%SQUIRREL_SQL_HOME%\lib\versioncheck.jar" JavaVersionChecker 1.6 1.7
>
> which is evalauted to
>
> ""C:\Program Files (x86)\Java\jdk"" -cp "%SQUIRREL_SQL_HOME%\lib\versioncheck.jar" JavaVersionChecker 1.6 1.7
>
> Mind the double quotes and the blank which is now seen as a delimiter token.
>
> ...and so far. I doubt that someone run this script ever on 64bit Win7 with 32bit Java (which is NOT unusual).
>
> Could someone review the script?
>
> Thank you
> Ben
>
>
>
|