简体   繁体   中英

typesafe installation: JDK not installed or found, even if they are

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.

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.

这对我有用:1。以管理员身份打开命令提示符3.使用activator.bat导航到该文件夹​​4.键入'activator ui',不要输入'5.按Enter键

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM