Cannot run program ".../jre/bin/javac": error=2, No such file or directory

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Cannot run program ".../jre/bin/javac": error=2, No such file or directory

wuyi
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: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Cannot run program ".../jre/bin/javac": error=2, No such file or directory

Sean Owen-2
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 <[hidden email]> 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: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Cannot run program ".../jre/bin/javac": error=2, No such file or directory

wuyi
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: [hidden email]