I am on a server with Fedora 25 installed. I am trying to compile bazel, and each time I try, it gives me this same message:
[~]$bash bz/./compile.sh
INFO: You can skip this first step by providing a path to the bazel binary as second argument:
INFO: bz/./compile.sh compile /path/to/bazel
🍃 Building Bazel from scratch
ERROR: JAVA_HOME (jdk-8u131-linux-x64/jdk1.8.0_131) is not a path to a working JDK.
But I can list the jdk files!
[~]$ls jdk-8u131-linux-x64/jdk1.8.0_131
bin javafx-src.zip man THIRDPARTYLICENSEREADME-JAVAFX.txt
COPYRIGHT jre README.html THIRDPARTYLICENSEREADME.txt
db lib release
include LICENSE src.zip
And the bin directory!
[~]$ls jdk-8u131-linux-x64/jdk1.8.0_131/bin
appletviewer javafxpackager jdb jrunscript pack200 unpack200
ControlPanel javah jdeps jsadebugd policytool wsgen
extcheck javap jhat jstack rmic wsimport
idlj javapackager jinfo jstat rmid xjc
jar java-rmi.cgi jjs jstatd rmiregistry
jarsigner javaws jmap jvisualvm schemagen
java jcmd jmc keytool serialver
javac jconsole jmc.ini native2ascii servertool
javadoc jcontrol jps orbd tnameserv
[~]$echo $JAVA_HOME
jdk-8u131-linux-x64/jdk1.8.0_131
So I have no idea how to proceed. It just refuses to recognize the jdk, even though I can see it where it should be. ???
The reason I am doing this is because I need to compile Tensorflow, so I can run all 16 processors on the server.
I run into the same problem. One has to install Java-devel via sudo dnf install java-devel, do export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-1.b12.fc25.x86_64 (depends of course on the actual version) and run ./compile.sh from the bazel files in the same terminal. Further I recommend to add $JAVA_HOME permanently to $PATH via export PATH=$JAVA_HOME:$PATH.