彻底解决this version of the Java Runtime only recognizes class file versions up to 52.0

超、凢脫俗 2024-02-17 11:59 177阅读 0赞

报错信息

  1. A JNI error has occurred, please check your installation and try again
  2. Exception in thread "main" java.lang.UnsupportedClassVersionError: org/springframework/boot/loader/JarLauncher has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0

这个错误的意思是当时开发程序的人使用的JDK的版本要比你现在运行的环境上的JDK版本高。比如他是使用JDK11开发的,然后把程序打包好,你下载了他的jar包到本地运行,然后报错,可能你本地的JDK版本是低于11的,所以报错。

解决方法

安装JDK21就行。继续看文章下面的对应关系,就知道应该安装哪个版本。

下载地址

官网下载

  1. https://www.oracle.com/java/technologies/downloads/

天翼云盘下载

  1. https://cloud.189.cn/web/share?code=JVBJn2ymYru2(访问码:le55)

f2bb1f84c82742ab963ab67dcfd1806d.png

JDK和编译版本对应关系

c674e5d45b8148799bd725b41e9547a8.png

如何查看版本对应号

1、IDEAL新建java工程,JDK选择一个随便的jdk版本。

2、新建一个Test.java,内容如下:

  1. package cn.renkai721;
  2. public class Test {
  3. public static void main(String[] args) {
  4. System.out.println("welcome jdk 21");
  5. }
  6. }

3、直接运行。

4、找到编译后的Test.class文件。

5、使用UltraEdit编辑器打开这个Test.class文件,然后找到7-8位的16进制数字。

  1. // ue编辑器下载地址
  2. https://www.bear20.com/pcwin/409/725858909.html

6e168126cd3a49d4b051b43e3d57a7b0.png

6、打开在线转换,将16进制的0041转换为10进制。

11529b5a205f436fb39b5d9e1ad2c28f.png

结束

-——华丽的分割线,以下是凑字数,大家不用花时间看,快去改代码——-

-——华丽的分割线,以下是凑字数,大家不用花时间看,快去改代码——-

-——华丽的分割线,以下是凑字数,大家不用花时间看,快去改代码——-

  1. package cn.renkai721.bean.vo;
  2. import lombok.extern.slf4j.Slf4j;
  3. @Slf4j
  4. public class MakeUpTheWordCount {
  5. private String make_up_the_word_count_column_999999999_1;
  6. private String make_up_the_word_count_column_999999999_2;
  7. private String make_up_the_word_count_column_999999999_3;
  8. private String make_up_the_word_count_column_999999999_4;
  9. private String make_up_the_word_count_column_999999999_5;
  10. private String make_up_the_word_count_column_999999999_6;
  11. private String make_up_the_word_count_column_999999999_7;
  12. private String make_up_the_word_count_column_999999999_8;
  13. private String make_up_the_word_count_column_999999999_9;
  14. private String make_up_the_word_count_column_999999999_10;
  15. private String make_up_the_word_count_column_999999999_11;
  16. private String make_up_the_word_count_column_999999999_12;
  17. private String make_up_the_word_count_column_999999999_13;
  18. private String make_up_the_word_count_column_999999999_14;
  19. private String make_up_the_word_count_column_999999999_15;
  20. private String make_up_the_word_count_column_999999999_16;
  21. private String make_up_the_word_count_column_999999999_17;
  22. private String make_up_the_word_count_column_999999999_18;
  23. private String make_up_the_word_count_column_999999999_19;
  24. private String make_up_the_word_count_column_999999999_20;
  25. public String getMake_up_the_word_count_column_999999999_1() {
  26. return make_up_the_word_count_column_999999999_1;
  27. }
  28. public void setMake_up_the_word_count_column_999999999_1(String make_up_the_word_count_column_999999999_1) {
  29. this.make_up_the_word_count_column_999999999_1 = make_up_the_word_count_column_999999999_1;
  30. }
  31. public String getMake_up_the_word_count_column_999999999_2() {
  32. return make_up_the_word_count_column_999999999_2;
  33. }
  34. public void setMake_up_the_word_count_column_999999999_2(String make_up_the_word_count_column_999999999_2) {
  35. this.make_up_the_word_count_column_999999999_2 = make_up_the_word_count_column_999999999_2;
  36. }
  37. public String getMake_up_the_word_count_column_999999999_3() {
  38. return make_up_the_word_count_column_999999999_3;
  39. }
  40. public void setMake_up_the_word_count_column_999999999_3(String make_up_the_word_count_column_999999999_3) {
  41. this.make_up_the_word_count_column_999999999_3 = make_up_the_word_count_column_999999999_3;
  42. }
  43. public String getMake_up_the_word_count_column_999999999_4() {
  44. return make_up_the_word_count_column_999999999_4;
  45. }
  46. public void setMake_up_the_word_count_column_999999999_4(String make_up_the_word_count_column_999999999_4) {
  47. this.make_up_the_word_count_column_999999999_4 = make_up_the_word_count_column_999999999_4;
  48. }
  49. public String getMake_up_the_word_count_column_999999999_5() {
  50. return make_up_the_word_count_column_999999999_5;
  51. }
  52. public void setMake_up_the_word_count_column_999999999_5(String make_up_the_word_count_column_999999999_5) {
  53. this.make_up_the_word_count_column_999999999_5 = make_up_the_word_count_column_999999999_5;
  54. }
  55. public String getMake_up_the_word_count_column_999999999_6() {
  56. return make_up_the_word_count_column_999999999_6;
  57. }
  58. public void setMake_up_the_word_count_column_999999999_6(String make_up_the_word_count_column_999999999_6) {
  59. this.make_up_the_word_count_column_999999999_6 = make_up_the_word_count_column_999999999_6;
  60. }
  61. public String getMake_up_the_word_count_column_999999999_7() {
  62. return make_up_the_word_count_column_999999999_7;
  63. }
  64. public void setMake_up_the_word_count_column_999999999_7(String make_up_the_word_count_column_999999999_7) {
  65. this.make_up_the_word_count_column_999999999_7 = make_up_the_word_count_column_999999999_7;
  66. }
  67. public String getMake_up_the_word_count_column_999999999_8() {
  68. return make_up_the_word_count_column_999999999_8;
  69. }
  70. public void setMake_up_the_word_count_column_999999999_8(String make_up_the_word_count_column_999999999_8) {
  71. this.make_up_the_word_count_column_999999999_8 = make_up_the_word_count_column_999999999_8;
  72. }
  73. public String getMake_up_the_word_count_column_999999999_9() {
  74. return make_up_the_word_count_column_999999999_9;
  75. }
  76. public void setMake_up_the_word_count_column_999999999_9(String make_up_the_word_count_column_999999999_9) {
  77. this.make_up_the_word_count_column_999999999_9 = make_up_the_word_count_column_999999999_9;
  78. }
  79. public String getMake_up_the_word_count_column_999999999_10() {
  80. return make_up_the_word_count_column_999999999_10;
  81. }
  82. public void setMake_up_the_word_count_column_999999999_10(String make_up_the_word_count_column_999999999_10) {
  83. this.make_up_the_word_count_column_999999999_10 = make_up_the_word_count_column_999999999_10;
  84. }
  85. public String getMake_up_the_word_count_column_999999999_11() {
  86. return make_up_the_word_count_column_999999999_11;
  87. }
  88. public void setMake_up_the_word_count_column_999999999_11(String make_up_the_word_count_column_999999999_11) {
  89. this.make_up_the_word_count_column_999999999_11 = make_up_the_word_count_column_999999999_11;
  90. }
  91. public String getMake_up_the_word_count_column_999999999_12() {
  92. return make_up_the_word_count_column_999999999_12;
  93. }
  94. public void setMake_up_the_word_count_column_999999999_12(String make_up_the_word_count_column_999999999_12) {
  95. this.make_up_the_word_count_column_999999999_12 = make_up_the_word_count_column_999999999_12;
  96. }
  97. public String getMake_up_the_word_count_column_999999999_13() {
  98. return make_up_the_word_count_column_999999999_13;
  99. }
  100. public void setMake_up_the_word_count_column_999999999_13(String make_up_the_word_count_column_999999999_13) {
  101. this.make_up_the_word_count_column_999999999_13 = make_up_the_word_count_column_999999999_13;
  102. }
  103. public String getMake_up_the_word_count_column_999999999_14() {
  104. return make_up_the_word_count_column_999999999_14;
  105. }
  106. public void setMake_up_the_word_count_column_999999999_14(String make_up_the_word_count_column_999999999_14) {
  107. this.make_up_the_word_count_column_999999999_14 = make_up_the_word_count_column_999999999_14;
  108. }
  109. public String getMake_up_the_word_count_column_999999999_15() {
  110. return make_up_the_word_count_column_999999999_15;
  111. }
  112. public void setMake_up_the_word_count_column_999999999_15(String make_up_the_word_count_column_999999999_15) {
  113. this.make_up_the_word_count_column_999999999_15 = make_up_the_word_count_column_999999999_15;
  114. }
  115. public String getMake_up_the_word_count_column_999999999_16() {
  116. return make_up_the_word_count_column_999999999_16;
  117. }
  118. public void setMake_up_the_word_count_column_999999999_16(String make_up_the_word_count_column_999999999_16) {
  119. this.make_up_the_word_count_column_999999999_16 = make_up_the_word_count_column_999999999_16;
  120. }
  121. public String getMake_up_the_word_count_column_999999999_17() {
  122. return make_up_the_word_count_column_999999999_17;
  123. }
  124. public void setMake_up_the_word_count_column_999999999_17(String make_up_the_word_count_column_999999999_17) {
  125. this.make_up_the_word_count_column_999999999_17 = make_up_the_word_count_column_999999999_17;
  126. }
  127. public String getMake_up_the_word_count_column_999999999_18() {
  128. return make_up_the_word_count_column_999999999_18;
  129. }
  130. public void setMake_up_the_word_count_column_999999999_18(String make_up_the_word_count_column_999999999_18) {
  131. this.make_up_the_word_count_column_999999999_18 = make_up_the_word_count_column_999999999_18;
  132. }
  133. public String getMake_up_the_word_count_column_999999999_19() {
  134. return make_up_the_word_count_column_999999999_19;
  135. }
  136. public void setMake_up_the_word_count_column_999999999_19(String make_up_the_word_count_column_999999999_19) {
  137. this.make_up_the_word_count_column_999999999_19 = make_up_the_word_count_column_999999999_19;
  138. }
  139. public String getMake_up_the_word_count_column_999999999_20() {
  140. return make_up_the_word_count_column_999999999_20;
  141. }
  142. public void setMake_up_the_word_count_column_999999999_20(String make_up_the_word_count_column_999999999_20) {
  143. this.make_up_the_word_count_column_999999999_20 = make_up_the_word_count_column_999999999_20;
  144. }
  145. }

发表评论

表情:
评论列表 (有 0 条评论,177人围观)

还没有评论,来说两句吧...

相关阅读