线程“主”中的异常java.lang.UnsupportedClassVersionError:org / apache / spark / launcher / Main

时间:2019-07-10 08:58:01

标签: apache-spark pyspark apache-spark-sql

学习Spark,尝试按照说明在我的PC上设置Spark

我正在使用此版本

  

spark-2.4.3-bin-hadoop2.6

我安装了jdk-7u79-windows-x64.exe并为Java应用程序禁用了IPv6

  

setx / M _JAVA_OPTIONS“ -Djava.net.preferIPv4Stack = true”

将Python安装到C:\Python27

将Hadoop二进制文件放入C:\Hadoop

  

setx / M HADOOP_HOME C:\ Hadoop

     

setx / M路径   “%path%; C:\ Python27;%PROGRAMFILES%\ Java \ jdk1.7.0_79 \ bin; C:\ Hadoop”

然后我需要通过运行以下命令来运行命令以在Python中测试Spark交互式shell

C:\Spark\bin\pyspark

但是我遇到此错误

C:\WINDOWS\system32>C:\Spark\bin\pyspark
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/spark/launcher/Main : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)

C:\WINDOWS\system32>

这是java -version

C:\WINDOWS\system32>java -version
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)

我重新安装JDK几次,但我仍然没有运气,我正在使用Win 10

我不明白我所缺少的内容,我在这里检查了特雷兹,但找不到任何适合我的东西

0 个答案:

没有答案