JBoss ON 3.3 server update fails on Windows with "Cannot open C:\opt\jboss\...\~4,2~6,2~2,2~8,2~10,2~12,2\..." due to JAVA_HOME containing spaces

Solution Verified - Updated -

Issue

  • Unable to upgrade server
  • Error:

    'C:\Program' is not recognized as an internal or external command, operable program or batch file.
    
  • Errors trying to apply update:

    A subdirectory or file C:\opt\jboss\on\jon-server-3.3.0.GA\..\rhq-agent\.patched\~4 already exists.
    Error occurred while processing: C:\opt\jboss\on\jon-server-3.3.0.GA\..\rhq-agent\.patched\~4.
    A subdirectory or file 2~6 already exists.
    Error occurred while processing: 2~6.
    ...
    The system cannot find the path specified.
    FINDSTR: Cannot open C:\opt\jboss\on\jon-server-3.3.0.GA\.patched\~4,2~6,2~2,2~8,2~10,2~12,2\writable.log
    Access is denied.
    
  • Update attempts to create a new directory named .patched\~4,2~6,2~2,2~8,2~10,2~12,2

  • apply-updates fails if JAVA_HOME or RHQ_JAVA_HOME path contains spaces

Environment

  • Red Hat JBoss Operations Network (ON) 3.3.6, 3.3.7
  • Microsoft Windows operating system
  • Executing apply-updates.bat
  • Java Runtime Environment (JRE) installed in directory containing spaces such as C:\Program Files\Java\jre1.8.0_77

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content