Craig
Craig

Reputation: 843

Problems with Java installation (making using Spark difficult)

I am trying to get Spark running locally. When I launch it, I get the following error, suggesting something is weird with my java installation (or the path to it). This is on Mac OS Yosemite.

line 190: /usr/java/jdk1.7.0_51/bin/java/bin/java/bin/java: No such file or directory

Any suggestions how to remedy this? Let me know if you need more info (I don't know where to start)

Edit: Clearly there is a setting wrong somewhere, I'm just not sure where. In my bash-profile, there is a line

JAVA_HOME=usr/bin/java

Also when I run java -version I get:

java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)

Upvotes: 4

Views: 982

Answers (1)

Craig
Craig

Reputation: 843

Solution: Something was weird with where Spark was looking for Java. Not sure how the default is set, but I found a way to override it.

1) In terminal run this and copy and paste the results. This gives you the path of your Java installation. $(dirname $(readlink $(which javac)))/java_home 2) In the spark-whatever/conf folder, make a file "spark-env.sh" and write "export JAVA_HOME="

Upvotes: 1

Related Questions