Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.
C:\Documents and Settings\js>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.6.0_11

C:\Documents and Settings\js>cd  %JAVA_HOME%\bin

C:\Program Files\Java\jdk1.6.0_11\bin>%JAVA_HOME%\bin java
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

How to solve this white space problem?

Thanks.

share|improve this question
    
This windows command prompt is not DOS, you are not running this in a DOS environment. –  whatsisname Sep 22 '09 at 23:18
add comment

migrated from stackoverflow.com Sep 27 '09 at 22:17

This question came from our site for professional and enthusiast programmers.

2 Answers

Use quotation marks:

cd "%JAVA_HOME%\bin"
"%JAVA_HOME%\bin\java"
share|improve this answer
add comment

If the "Java" is an application you must do this to run.

"%JAVA_HOME%\bin\"Java

or

"%JAVA_HOME%\bin\"Java.Exe
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.