Fresh install of jME3 SDK on Linux 64 claims it "cannot find java"

As the title suggests, my fresh install of jME3 SDK on Ubuntu 13.10 says it “cannot find java”.

Does anyone know, is the statement on the Downloads page (hub.jmonkeyengine.org/downloads/) that the “jMonkeyEngine SDK comes bundled with a compatible JDK, there is no need to install any additional software” accurate?

As far as I know it tries to use a installed one if aviable and falls back to bundled else.
Maybee there is something making it believe there is one installed already?

Is a java in the path?

The JDK is included, when and how do you get this message?

Thanks for your quick replies.

@Empire Phoenix said: As far as I know it tries to use a installed one if aviable and falls back to bundled else. Maybee there is something making it believe there is one installed already?

Is a java in the path?

There is no working javac accessible via $PATH.

@normen said: The JDK is included, when and how do you get this message?

When attempting to run jmonkeyplatform after what appears to be a successful install.

> sudo ./jmonkeyplatform-linux-x64.sh --verbose > ~/jme3-install-log-2.txt
> …inconsequential wizard warning message…
> /usr/local/jmonkeyplatform/bin/jmonkeyplatform
> Cannot find java. Please use the --jdkhome switch.

Partial resolution:

The underlying problem seems to be that while the /usr/local/jmonkeyplatform/bin/jmonkeyplatform shell script has been installed with execute permissions for ordinary users, the bundled Oracle JDK has been installed with only read permissions for ordinary users. So when an ordinary user runs the jmonkeyplatform script, the JMonkey version of Netbeans will start up and then vomit the rather misleading error message “cannot find java” when it realises that it can’t use the java executables it has actually found.

Trying

> sudo /usr/local/jmonkeyplatform/bin/jmonkeyplatform

appears to run jmonkeyplatform just fine.

But of course I don’t really want to run any SDK with super user privileges, let alone one with a whiff of mischief…

But why did you run the installer with root permissions? oO

There were several factors, but the most immediate was that I was intending to install jME3 SDK in a system folder, for all users, not just in my home directory, for me.

Likely workaround:

Now that I have had time to check, a straightforward

> sudo chmod -R a+rX /usr/local/jmonkeyplatform

seems to fix things up, giving ordinary users the necessary permissions to run the SDK (and build programs with it).

1 Like

Just to add this here: The correct fix is to ONLY add the a+rx permissions to jmonkeyplatform/jdk/bin

Then the bundled jdk has the same permissions as a normal jdk.

I needed this for an installation to a multi-user machine.