David Frank
David Frank

Reputation: 6092

Play framework does not see JRE

I have just started to learn Play! Framework, but I got an error right at the beginning. Following the instructions I created a new project and wanted to run it, so I typed in:

play run ./app/first

It gave me the following result:

Error opening registry key 'Software\JavaSoft\Java Runtime Environment'
Error: could not find java.dll
Error: could not find Java SE Runtime Environment.

Of course there is a java.dll file in the Java directory. I'd even obtained the newest java version, if I type in java -version, the result is:

java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)

I am using Windows 7 x64. What causes the error and how could I resolve it?

Upvotes: 1

Views: 1816

Answers (1)

Zapodot
Zapodot

Reputation: 462

As the message indicates there seem to be an error with the registry settings for the Java runtime. If you set the environment variable JAVA_HOME to the path where you know the Java runtime to be installed in the same command window that you will run "play run" in using the command

set JAVA_HOME=c:\Program files\Java\jre6 (or wherever your Java runtime is installed)  

You shold then be able to run Play in the current command window.

The easiest way to fix this issue permanently is to reinstall the JavaSE runtime using an installer downloaded from Oracle's download site

Upvotes: 1

Related Questions