火花推出:找到版本

编程入门 行业动态 更新时间:2024-10-27 08:39:39
本文介绍了火花推出:找到版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我的环境是Windows 7,并安装了斯卡拉2.11.4(效果很好),爪哇1.8

我曾尝试火花1.2.0彬hadoop2.4和火花1.2.1彬hadoop2.4每次我把

斌\\火花shell.cmd

我刚刚从Windows得到了错误:

找到:'版本':没有这样的文件或目录否则在这个时候意外。

有什么我忽略了吗?

感谢您这么多。

更新:(从火花class2.cmd)

C:\\用户\\火花1.2.1彬hadoop2.4> FOR / F令牌= 3%i的('Java的版本2 - ;&放大器; 1 |查找版)并设置jversi上=%I发现:'版本':没有这样的文件或目录否则在这个时候意外。

如果我尝试Java的版本,似乎工作的Java端

C:\\用户\\火花1.2.1彬hadoop2.4> Java的版本Java版本1.8.0_31的Java(TM)SE运行时环境(建立1.8.0_31-B13)Java的热点(TM)64位服务器VM(建设25.31-B07,混合模式)

解决方案

我已经解决了这个问题。这里是我的解决方案。

我已经安装了cygwin和PATH系统变量指向C:\\ cygwin64 \\ bin \\其中有一个FIND.EXE

因此​​,在火花class2.cmd行

FOR / F令牌= 3%% i的('Java的版本2 ^> ^&放大器; 1 ^ |查找版本')做设置jversion =% %一世

没有使用正确的查找的可执行文件。

更改该行本

FOR / F令牌= 3%% i的('Java的版本2 ^> ^&放大器; 1 ^ | C:\\ WINDOWS \\ SYSTEM32 \\ FIND.EXE版)并设置jversion = %%我

固定我的问题。

My environment is Windows 7, and scala 2.11.4 installed (works well), Java 1.8

I have tried spark-1.2.0-bin-hadoop2.4 and spark-1.2.1-bin-hadoop2.4 and each time I put

bin\spark-shell.cmd

I just got the error from Windows:

find: 'version': No such file or directory else was unexpected at this time.

Is there anything I ignored here?

Thank you so much.

updated: (from spark-class2.cmd)

C:\Users\spark-1.2.1-bin-hadoop2.4>for /F "tokens=3" %i in ('java -version 2>&1 | find "version"') do set jversi on=%i find: 'version': No such file or directory else was unexpected at this time.

and if I try java -version, it seems working on java side

C:\Users\spark-1.2.1-bin-hadoop2.4>java -version java version "1.8.0_31" Java(TM) SE Runtime Environment (build 1.8.0_31-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

解决方案

I've solved this problem. Here is my solution.

I have cygwin installed and PATH system variable pointed to C:\cygwin64\bin\ where there is a find.exe.

Therefore, the line in spark-class2.cmd

for /f "tokens=3" %%i in ('java -version 2^>^&1 ^| find "version"') do set jversion=%%i

did not use the proper "find" executable.

Changing this line to this

for /f "tokens=3" %%i in ('java -version 2^>^&1 ^| C:\Windows\System32\find.exe "version"') do set jversion=%%i

fixed my problem.

更多推荐

火花推出:找到版本

本文发布于:2023-11-03 01:10:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1553874.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:火花   版本

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!