JDK-4966488 : Silent install does not accept spaces in install directory path
  • Type: Bug
  • Component: install
  • Sub-Component: install
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Not an Issue
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2003-12-10
  • Updated: 2003-12-11
  • Resolved: 2003-12-11
Description

Name: gm110360			Date: 12/10/2003


FULL PRODUCT VERSION :
java version "1.4.2_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03)
Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Windows XP Pro
Windows 2000

A DESCRIPTION OF THE PROBLEM :
When using the silent install mode on Windows 2000/XP and not using the default path, the specified path is not accepted if it includes spaces. Our application is installed in "C:\Program Files\AppName" and we want it to have a private JRE installed in its own directory. The only way around this is to work out what the short file path format is "C:\Progra~1 etc." and use that. Surely this would be an easy fix in the install ?

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Specify a path containing spaces (C:\Program Files\JRE) when using silent install mode.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The JRE should install to the specified path.
ACTUAL -
The install fails.

REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
Use the short form for directory names (C:\Progra~1...)
(Incident Review ID: 226759) 
======================================================================

Comments
EVALUATION You need to use quotes when passing paths to the installer if the paths have spaces. Because the path arg is already in quotes, you need to escape each quote with a '\' so it gets passed through. So the command would be j2re.exe /s /v"/qn INSTALLDIR=\"C:\Program Files\JRE\"" ###@###.### 2003-12-11
11-12-2003