Issue1548

classification
Title: Parentheses in CLASSPATH cause errors in jython.bat
Type: Severity: normal
Components: Core Versions: 2.5.1
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: otmarhumbel Nosy List: jaraco, otmarhumbel
Priority: Keywords: patch

Created on 2010-01-28.19:46:01 by jaraco, last changed 2010-01-30.07:56:35 by otmarhumbel.

Files
File name Uploaded Description Edit Remove
jython.bat.patch otmarhumbel, 2010-01-30.06:27:51 Patch for jython.bat
jython_test.bat.template.patch otmarhumbel, 2010-01-30.06:28:37 Patch for the installer autotests
Messages
msg5463 (view) Author: Jason R. Coombs (jaraco) Date: 2010-01-28.19:46:00
It appears that having items in the CLASSPATH with parentheses in the name causes problems with Jython.bat.

One common case where this occurs is when Quicktime is installed on 64-bit Windows - the following classpath is set:

CLASSPATH=.;C:\Program Files (x86)\QuickTime\QTSystem\QTJava.zip

If one attempts to run jython in this environment, it fails with the error:

\QuickTime\QTSystem\QTJava.zip was unexpected at this time.

Originally, this was reported under issue1330 as I assumed it was the spaces in the classpath causing the problem.

otmarhumbel has suggested the following workaround:

A possible solution could be to replace

:argsDone
if not defined _BOOT_CP (
  if defined CLASSPATH (
    set CLASSPATH=%_CP:"=%;%CLASSPATH:"=%
  ) else (
    set CLASSPATH=%_CP:"=%
  )
)

with

:argsDone
rem do not use 'if () else ()' because this does not work with CLASSPATH containing (x86)
if defined _BOOT_CP goto fullCmd
if defined CLASSPATH goto classpathDefined
set CLASSPATH=%_CP:"=%
goto fullCmd
:classpathDefined
set CLASSPATH=%_CP:"=%;%CLASSPATH:"=%
:fullCmd
msg5469 (view) Author: Oti Humbel (otmarhumbel) Date: 2010-01-30.07:56:35
fixed with revisions 6965 and 6966
History
Date User Action Args
2010-01-30 07:56:35otmarhumbelsetstatus: open -> closed
resolution: fixed
messages: + msg5469
2010-01-30 06:28:37otmarhumbelsetfiles: + jython_test.bat.template.patch
2010-01-30 06:27:52otmarhumbelsetfiles: + jython.bat.patch
keywords: + patch
2010-01-29 17:47:07otmarhumbelsetassignee: otmarhumbel
2010-01-28 19:46:02jaracocreate