首页 > 系统相关 >PyCharm在Linux安装出现报错-Java Runtime (class file version 55.0)

PyCharm在Linux安装出现报错-Java Runtime (class file version 55.0)

时间:2022-11-06 18:33:53浏览次数:47  
标签:55.0 java Java 报错 usr ubuntu PATH local


    在Linux桌面下安装PyCharm的时候出现如下报错


root@ubuntu:~# cd pycharm-community-2021.1.1
root@ubuntu:~/pycharm-community-2021.1.1# ls
bin classpath.txt Install-Linux-tar.txt license
brokenPlugins.db help jbr plugins
build.txt icons.db lib product-info.json
root@ubuntu:~/pycharm-community-2021.1.1# cd bin/
root@ubuntu:~/pycharm-community-2021.1.1/bin# ls
format.sh inspect.sh printenv.py pycharm.svg
fsnotifier libdbm64.so pycharm64.vmoptions pycharm.vmoptions
fsnotifier64 log.xml pycharm.png restart.py
idea.properties ltedit.sh pycharm.sh
root@ubuntu:~/pycharm-community-2021.1.1/bin# ./pycharm.sh
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/intellij/idea/Main has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:601)
root@ubuntu:~/pycharm-community-2021.1.1/bin#


PyCharm在Linux安装出现报错-Java Runtime (class file version 55.0)_bash


此问题为Java版本太低,需要使用新的jdk版本

49 = Java 5
50 = Java 6
51 = Java 7
52 = Java 8
53 = Java 9
54 = Java 10
55 = Java 11
56 = Java 12
57 = Java 13
58 = Java 14
59 = Java 15
60 = Java 16


安装Java

root@ubuntu:~# tar xvf jdk-16.0.1_linux-aarch64_bin.tar.gz 
root@ubuntu:~# mv jdk-16.0.1 /usr/local/
root@ubuntu:~# cd /usr/local/
root@ubuntu:/usr/local# ls
Ascend dcmi games jdk-16.0.1 lib python3.7.5 share
bin etc include jdk1.8.0_291 man sbin src
root@ubuntu:/usr/local# vim /etc/profile
root@ubuntu:/usr/local# source /etc/profile


环境变量配置文件

root@ubuntu:/usr/local# cat /etc/profile
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).


if [ "${PS1-}" ]; then
if [ "${BASH-}" ] && [ "$BASH" != "/bin/sh" ]; then
# The file bash.bashrc already sets the default PS1.
# PS1='\h:\w\$ '
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
fi
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='$ '
fi
fi
fi


if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
. $i
fi
done
unset i
fi




#用于设置python3.7.5库文件路径
export LD_LIBRARY_PATH=/usr/local/python3.7.5/lib:$LD_LIBRARY_PATH
#如果用户环境存在多个python3版本,则指定使用python3.7.5版本
export PATH=/usr/local/python3.7.5/bin:$PATH


# control log level. 0-DEBUG, 1-INFO, 2-WARNING, 3-ERROR, default level is WARNING.
export GLOG_v=2


# Conda environmental options
LOCAL_ASCEND=/usr/local/Ascend # the root directory of run package


# lib libraries that the run package depends on
export LD_LIBRARY_PATH=${LOCAL_ASCEND}/add-ons/:${LOCAL_ASCEND}/ascend-toolkit/latest/fwkacllib/lib64:${LOCAL_ASCEND}/driver/lib64:${LOCAL_ASCEND}/ascend-toolkit/latest/opp/op_impl/built-in/ai_core/tbe/op_tiling:${LD_LIBRARY_PATH}


# Environment variables that must be configured
export TBE_IMPL_PATH=${LOCAL_ASCEND}/ascend-toolkit/latest/opp/op_impl/built-in/ai_core/tbe # TBE operator implementation tool path
export ASCEND_OPP_PATH=${LOCAL_ASCEND}/ascend-toolkit/latest/opp # OPP path
export PATH=${LOCAL_ASCEND}/ascend-toolkit/latest/fwkacllib/ccec_compiler/bin/:${PATH} # TBE operator compilation tool path
export PYTHONPATH=${TBE_IMPL_PATH}:${PYTHONPATH} # Python library that TBE implementation depends on


export JAVA_HOME=/usr/local/jdk-16.0.1
export JRE_HOME=/usr/local/jdk-16.0.1/jre/
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOME/bin
root@ubuntu:/usr/local#

PyCharm在Linux安装出现报错-Java Runtime (class file version 55.0)_ubuntu_02







标签:55.0,java,Java,报错,usr,ubuntu,PATH,local
From: https://blog.51cto.com/u_12212643/5827510

相关文章

  • SAP Java Connector 正常运行所需的网络配置
    SAPJCO在本地安装成功并且将目录加到PATH环境变量后,运行命令行:java-jarsapjco3.jar如果看到下列弹出窗口,说明JCO配置成功。JCo使用基于TCP/IP的CPI-C协议......
  • JAVA开发搞了一年多的大数据,究竟干了点啥
    JAVA开发搞了一年多大数据的总结​ 2021年7月份加入了当前项目组,以一个原汁原味的Java开发工程师的身份进来的,来了没多久,项目组唯一一名大数据开发工程师要离职了,一时间一......
  • 最新版Jenkins(jdk11)-----JAVA项目使用低版本jdk编译的解决办法
    背景开源Devops工具Jenkins宣布:从6月28日发布的Jenkins2.357和即将发布的9月LTS版本开始,Jenkins最低需要Java11。所以,你懂得,很坑,项目只是jdk1.8解决......
  • java IO流
    java文件创建:(1)第一种创建方式(2)第二种创建方式 (3)第三种创建方式  (4)文件信息的查询操作  (5)文件夹的创建file.mkdir()创建文件夹成功返回true,失败返回false......
  • JavaI/O流
    创建文件的方法方法一@Testpublicvoidcreate1(){StringfilePath="D:\\file1.txt";Filefile=newFile(filePath);try{......
  • "xxx cannot be cast to jakarta.servlet.Servlet "报错解决方式
    在做jsp的上机时候同学出现了一个500错误:com.kailong.servlet.ComputeBillcannotbecasttojaka.servlet.Servlet然后因为我用的tomcat是8.xx版本,并没有出现过这个情......
  • JAVA异常处理
    异常处理异常1.异常的体系结构java.lang.Throwable* |---java.lang.Error:一般不编写针对性的代码进行处理* |---java.lang.Exception:可以进行异常的处理* |......
  • javaScript(2)
    运算符+数学运算字符串拼接varc=1+1+'str'+(1+1)//2str2     任何数值类型的值+字符串都是字符串/除法var10/2//5var0/0//NaN ......
  • Java 变量存储的位置
    局部变量方法中的局部变量存在于栈内存。每当程序调用一个方法时,系统都会为该方法建立一个方法栈,其所在方法中声明的变量就放在方法栈中,当方法结束系统会释放方法栈,其对应......
  • JAVA-考勤查询实现
    packagecom.itheima;importjavax.swing.*;importjava.awt.event.ActionEvent;importjava.awt.event.ActionListener;importjava.text.ParseException;importj......