2

I want to set my java_home variable, but have a custom enough OS not to be able to find my jdk dir as prompted everywhere (it's a chromium os, and has installed jdk8 by chromebrew...). What i have is a usr/local/jre folder, and few java* binaries in usr/local/bin.

Can the jre I have be the same that everyone refers to as /usr/java or /usr/java/jdk? The jre folder includes a bin, lib and plugin folder and some tl;dr files. Thanks a lot!

bpstrngr
  • 339
  • 3
  • 13

1 Answers1

0

There is no "standard" definition for the JAVA_HOME, that is you can point it to the folder where either the JRE or the JDK is installed. The only requirement (which is in fact more of a generally accepted convention) is that $JAVA_HOME/bin/java should start the Java runtime.

This happens if you point JAVA_HOME to either the JDK or JRE folder, in both cases there is a folder /bin and inside the "java" executable.

In your case, since you identified the JRE installation folder, you can point JAVA_HOME to it.

Matei Florescu
  • 1,155
  • 11
  • 23
  • Thanks for the reasoning, all java configuration again seems a little overmystified. Trying to get maven work, which again is nowhere explained clearly, only how "not to worry, this and that fancy IDE will do all the so very complicated things for you". So i'm still not sure if this was my actual problem. :D. – bpstrngr May 01 '17 at 10:10