Pergunta

I have JDK (both 1.7.0.3 and 1.8.0) installed. I have added path C:\Program Files\Java\jdk1.7.0_03\bin or C:\Program Files\Java\jdk1.8.0 alternately and also have added system variable JAVA_HOME with C:\Program Files\Java\jdk1.7.0_03 or C:\Program Files\Java\jdk1.8.0 respectively.

I have downloaded typesafe activator with play, and extracted it in my C:\ drive. Then when I try to run it by activator.bat or by command activator ui from CMD the following error(s) are shown:

C:\activator-1.0.13>activator ui
'"C:\Program Files\Java\jdk1.8.0\bin\java.exe" -version 2>&1' is not recognized
as an internal or external command,
operable program or batch file.
'"C:\Program Files\Java\jdk1.8.0\bin\javac.exe" -version 2>&1' is not recognized
 as an internal or external command,
operable program or batch file.

A Java JDK is not installed or can't be found.
JAVA_HOME = "C:\Program Files\Java\jdk1.8.0"

Please go to
  http://www.oracle.com/technetwork/java/javase/downloads/index.html
and download a valid Java JDK and install before running Activator.

If you think this message is in error, please check
your environment variables to see if "java.exe" and "javac.exe" are
available via JAVA_HOME or PATH.

I am using MS Windows 7.

Additional information:

C:\activator-1.0.13>javac -version
javac 1.8.0

C:\activator-1.0.13>java -version
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)

C:\activator-1.0.13>activator ui
'"C:\Program Files\Java\jdk1.8.0\bin\java.exe" -version 2>&1' is not recognized
as an internal or external command,
operable program or batch file.
'"C:\Program Files\Java\jdk1.8.0\bin\javac.exe" -version 2>&1' is not recognized
 as an internal or external command,
operable program or batch file.

A Java JDK is not installed or can't be found.
JAVA_HOME = "C:\Program Files\Java\jdk1.8.0"

Please go to
  http://www.oracle.com/technetwork/java/javase/downloads/index.html
and download a valid Java JDK and install before running Activator.

If you think this message is in error, please check
your environment variables to see if "java.exe" and "javac.exe" are
available via JAVA_HOME or PATH.
Foi útil?

Solução

I was having a similar problem on Windows... 'C:\Program' is not recognized as an internal or external command

Installing Java to a path without spaces and using that as my JAVA_HOME fixed the problem for me.

Outras dicas

This worked for me: 1. Open a Command Prompt as administrator 3. Navigate to the folder with activator.bat 4. Type 'activator ui' without the ' 5. Press enter

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top