Class Activator: Java JDK not found

I am trying to run a type activator on Windows 8.1 x64. He continues to say that I do not have a valid JDK installation:

A Java JDK is not installed or can't be found. JAVA_HOME = "C:\Program Files\Java\jdk1.7.0_45\bin" 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. Press any key to continue . . . 

I have JAVA_HOME installed:

 C:\Program Files\Java\jdk1.7.0_45\bin 

This is a valid location.

+7
typesafe
source share
4 answers

JAVA_HOME should only point to the JDK directory, not bin .

+14
source share

Here is my way:

Add the following code to your .bat activator on line 112:

 if "%JAVAOK%"=="false" ( set "_JAVACMD=C:\Program Files (x86)\Java\jdk1.6.0_91\bin\java.exe" set "JAVAOK=true" set "JAVA_VERSION=1.6" ) 

Or where your java.exe is always located and regardless of your version of Java.

Your code should now look like this:

 rem BAT has no logical or, so we do it OLD SCHOOL! Oppan Redmond Style set JAVAOK=true if not defined JAVAINSTALLED set JAVAOK=false if not defined JAVACINSTALLED set JAVAOK=false if "%JAVAOK%"=="false" ( set "_JAVACMD=C:\Program Files (x86)\Java\jdk1.6.0_91\bin\java.exe" set "JAVAOK=true" set "JAVA_VERSION=1.6" ) if "%JAVAOK%"=="false" ( echo. 

When I typed the "path" in cmd, I got my class path, but "java_home", "java -v", etc. did not work. I don't know why I have such a problem, but my (ugly) workaround worked.

+7
source share

I had a similar problem for Windows 7 64b. The problem was solved by changing the installed directory from "C: \ Program Program ..." to the directory without a space, for example, "c: \ java".

So the solution: Installing Java in a path without spaces.

Hope this helps.

0
source share

This worked for me:

  • Open command prompt as administrator
  • Go to the folder with the .bat activator
  • Enter "activator ui" without "
  • Press enter
-one
source share

All Articles