You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spark.apache.org by wuyi <ng...@163.com> on 2018/12/02 03:53:53 UTC
Cannot run program ".../jre/bin/javac": error=2, No such file or
directory
Dear all,
I use cmd "*./build/mvn -Pyarn -Phadoop-2.7 -Dhadoop.version=2.7.6
-DskipTests clean package*" to
compile Spark2.4, but failed on Spark Project Tags, which throws error:
*Cannot run program
"/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/bin/javac":
error=2, No such file or directory*
And I double check my
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home,
and
cmd "java -version" can be executed successfully, also for "javac -help".
Here's some compile info:
INFO] Using zinc server for incremental compilation
[INFO] Toolchain in scala-maven-plugin:
*/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre*
[warn] Pruning sources from previous analysis, due to incompatible
CompileSetup.
[info] Compiling 2 Scala sources and 8 Java sources to
/Users/wuyi/workspace/spark/common/tags/target/scala-2.12/classes...
[error] Cannot run program
"/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/bin/javac":
error=2, No such file or directory
I guess maven should find *javac* under directory *$JAVA_HOME/bin*, but why
it goes to *$JAVA_HOME/jre/bin * ?
I'd appreciate a lot if any devs could give me a hint. THANKS.
Best wishes.
wuyi
--
Sent from: http://apache-spark-developers-list.1001551.n3.nabble.com/
---------------------------------------------------------------------
To unsubscribe e-mail: dev-unsubscribe@spark.apache.org
Re: Cannot run program ".../jre/bin/javac": error=2, No such file
or directory
Posted by wuyi <ng...@163.com>.
Hi, Owen, thank for your suggestion.
I recheck my env and do not find any wrong with JAVA_HOME. But I'm agree
with you there must be something wrong with the system env.
Currently, I created a link file (named javac) under $JAVA_HOME/jre/bin to
link to $JAVA_HOME/bin/javac to work around this problem. And it works fine
for me.
--
Sent from: http://apache-spark-developers-list.1001551.n3.nabble.com/
---------------------------------------------------------------------
To unsubscribe e-mail: dev-unsubscribe@spark.apache.org
Re: Cannot run program ".../jre/bin/javac": error=2, No such file or directory
Posted by Sean Owen <sr...@gmail.com>.
javac is in $JAVA_HOME/bin/javac on Mac OS installations. It has
always worked fine on my Mac and for many other developers. You
probably have an env problem, like: that's not actually where java is,
or this isn't the JAVA_HOME actually reaching your build.
On Sat, Dec 1, 2018 at 9:53 PM wuyi <ng...@163.com> wrote:
>
> Dear all,
>
> I use cmd "*./build/mvn -Pyarn -Phadoop-2.7 -Dhadoop.version=2.7.6
> -DskipTests clean package*" to
> compile Spark2.4, but failed on Spark Project Tags, which throws error:
>
> *Cannot run program
> "/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/bin/javac":
> error=2, No such file or directory*
>
> And I double check my
> JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home,
> and
> cmd "java -version" can be executed successfully, also for "javac -help".
>
>
> Here's some compile info:
>
> INFO] Using zinc server for incremental compilation
> [INFO] Toolchain in scala-maven-plugin:
> */Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre*
> [warn] Pruning sources from previous analysis, due to incompatible
> CompileSetup.
> [info] Compiling 2 Scala sources and 8 Java sources to
> /Users/wuyi/workspace/spark/common/tags/target/scala-2.12/classes...
> [error] Cannot run program
> "/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/bin/javac":
> error=2, No such file or directory
>
>
> I guess maven should find *javac* under directory *$JAVA_HOME/bin*, but why
> it goes to *$JAVA_HOME/jre/bin * ?
>
> I'd appreciate a lot if any devs could give me a hint. THANKS.
>
> Best wishes.
> wuyi
>
>
>
>
> --
> Sent from: http://apache-spark-developers-list.1001551.n3.nabble.com/
>
> ---------------------------------------------------------------------
> To unsubscribe e-mail: dev-unsubscribe@spark.apache.org
>
---------------------------------------------------------------------
To unsubscribe e-mail: dev-unsubscribe@spark.apache.org