0

Even though JAVA_HOME is set correctly, still Apache James fails to start with message ERROR: JAVA_HOME not found in your environment.

I have correctly installed latest version of JDK 8 (jdk1.8.0_231) and running all the IDEs (NetBeans) and Servers (Payara 5) successfully. However, Apache James (latest V 2.3.2.1) never picks the variable value for JAVA_HOME

echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_231.jdk/Contents/Home

So far so good. Now I will run Apache James

sudo <path-to-james>/bin/run.sh
ERROR: JAVA_HOME not found in your environment.

Which is rather strange!

Any thoughts would be greatly appreciated.

Expected - I expect Apache James to run straightway

Actual - Annoying error of JAVA_HOME not found!

Olaf Kock
  • 46,930
  • 8
  • 59
  • 90
Singam
  • 443
  • 3
  • 12
  • did you set JAVA_HOME – abhinavsinghvirsen Oct 19 '19 at 10:41
  • I get the following on colsole- -bash: /Library/Java/JavaVirtualMachines/jdk1.8.0_231.jdk/Contents/Home/java: No such file or directory – Singam Oct 19 '19 at 12:57
  • But java -version when typed alone (without full path), generates the expected output i.e```java version "1.8.0_231" Java(TM) SE Runtime Environment (build 1.8.0_231-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)``` - Which is rather strange! – Singam Oct 19 '19 at 13:01
  • 2
    @Marged Actually you should rather run `$JAVA_HOME/bin/java -version` – Benoit Oct 22 '19 at 08:49
  • There is no `Contents/Home` in a regular Java installation. The path you set in your `PATH` is different from that you have in your `JAVA_HOME`. Run a `find / -name java` to find all the Java installations and set your `JAVA_HOME`correctly. – Marged Oct 22 '19 at 11:49
  • @benoit: Yes, this was a lapse – Marged Oct 22 '19 at 11:50

0 Answers0