O aplicativo (Cocos2d-x) informa que
JAVA_HOME is set to an invalid directory:
/usr/lib/jvm/java-1.9.0-openjdk-amd64
Meu /etc/environment
contém isso:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
export JAVA_HOME
Conteúdo de ~./bashrc
:
# Add environment variable ANT_ROOT for cocos2d-x
export ANT_ROOT="/usr/share/ant/bin"
export PATH=$ANT_ROOT:$PATH
JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk-amd64"
Saída de whereis java
:
java: /usr/bin/java /usr/share/java /usr/share/man/man1/java.1.gz
Saída de which java
:
/usr/bin/java
Saída de java -version
:
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode
ls /usr/lib/jvm
dá isto:
java-1.8.0-openjdk-amd64 java-8-openjdk-amd64
O próprio JDK funciona: eu posso compilar programas Java e Android (não-cocos).