解决java.io.IOException: Cannot run program "cygpath": CreateProcess error=2, 系统找不到指定的文件 的错误

一、外部环境:

系统环境:Windows 8

磁盘分区:只有C盘

开发环境:IntelliJ IDEA Community Edition 2016.1.3(64)

执行代码:rdd.saveAsTextFile(this.resultPath);

二、错误信息:

错误提示1:

16/09/05 11:32:41 ERROR Executor: Exception in task 0.0 in stage 1.0 (TID 1)
java.io.IOException: Cannot run program "cygpath": CreateProcess error=2, 系统找不到指定的文件。

错误提示2:

Caused by: java.io.IOException: CreateProcess error=2, 系统找不到指定的文件。

错误提示3:

Exception in thread "main" org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 1.0 failed 1 times, most recent failure: Lost task 0.0 in stage 1.0 (TID 1, localhost): java.io.IOException: Cannot run program "cygpath": CreateProcess error=2, 系统找不到指定的文件。

 

三、解决方法:

1.安装cgywin

2.在系统变量path中添加:C:\cygwin64\bin ,注意,一定要到bin 目录。

3.重启开发环境,调试执行,OK

posted on 2016-09-05 15:05  唐科  阅读(4714)  评论(0编辑  收藏  举报

导航