The engine won't start (Linux)

Hello There! I’m a newbie on Java and JME, at 12/13 years old I was playing with Unity 3D in Windows (I never can’t create a complex and COMPLETE game… but you can view these old shit in my channel (you can view projects like “The Great Job”, “Space Fighter” and “Laberin 3DS”), but now I have 15 years old (looking for 16 haha) and I’m using Linux, so Unity won’t work natively :stuck_out_tongue:
Now I’m looking for make a serious game :smiley: :smiley:

Yesterday I installed jMonkeyEngine in my PC successfully but I can’t start this engine :stuck_out_tongue:
So… I put this command in my terminal:

java -version

The terminal says:

java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

When I start the engine in the terminal, he says:

Cannot find java. Please use the --jdkhome switch.

I can’t find How-To-Use the --jdkhome swich, but I read that if I edit a file in the graphics engine, I can indicate where’s java. The file is located in /usr/local/jmonkeyplatform/etc and the file have jmonkeyplatform.conf name. The original file was:

# ${HOME} will be replaced by user home directory according to platform
default_mac_userdir="${HOME}/Library/Application Support/${APPNAME}/3.0"

# options used by the launcher by default, can be overridden by explicit
# command line switches
default_options="--branding jmonkeyplatform -J-Xms24m -J-Xmx512m -J-XX:PermSize=128m -J-XX:MaxDirectMemorySize=2048m -J-Dsun.java2d.noddraw=true"
# for development purposes you may wish to append: -J-Dnetbeans.logger.console=true -J-ea

# default location of JDK/JRE, can be overridden by using --jdkhome <dir> switch

# clusters' paths separated by path.separator (semicolon on Windows, colon on Unices)

I replaced the line jdkhome=“jdk” with jdkhome="/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java", and still not works!

What is my problem?

PD: Sorry for my english :frowning:


I would suggest you trying using java install from ppa
Like this for example:

I’d suggest also intalling a package name “oracle-java8-set-default” from the same ppa.
It will configure correctly your environment.

At least it is what i’ve done and it works nicely for me.

do “chmod +x jmonkeyplatform/jdk/jre/bin/*” and keep the original values in the conf file

try this:

1 Like

yeah! that works! :smiley:
Thanks to everyone, now I can start a serious project! hehe :wink:

1 Like

Great to hear that it works now, but it would be interesting to know why this happened.
I am running Linux with jme3 and never encountered this problem.

Could it be that you have the java 8 JRE (Runtime Environment) installed, but did not install the JDK (Development Kit) for Java 8?

The package would be called openjdk-X-jdk (also always recommend openjdk-X-source)

1 Like

This will make you run the open 1.7 jdk while the last version is 1.8
I suggest you to download the official jdk (not openjdk) 1.8 and use it as platform for developing.

Why should we avoid OpenJDK?
I had no issues with OpenJDK 7. It was very reliable.

I only use Oracle JDK 8, because OpenJDK was not done yet as I upgraded to Java 8.

Infact i’m talking about JDK 8