不支持的版本MAJOR.MINOR 52.0 [英] Unsupported major.minor version 52.0

查看:836
本文介绍了不支持的版本MAJOR.MINOR 52.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

图片:


显示版本的命令提示符


错误的图片

import java.applet.Applet;
import java.awt.*;
public class Hello extends Applet {
   // Java applet to draw "Hello World"
   public void paint (Graphics page) {
      page.drawString ("Hello World!", 50, 50);
   }
}

的Hello.html

<HTML>
<HEAD>
<TITLE>HelloWorld Applet</TITLE>
</HEAD>
<BODY>
<APPLET CODE="Hello.class" WIDTH=300 HEIGHT=150>
</APPLET>
</BODY>
</HTML>

错误

Hello : Unsupported major.minor version 52.0

有谁知道这个问题可能是什么?

Does anyone know what the problem may be?

推荐答案

智能的方式来解决这个问题是使用最新的SDK编译和使用的cross编译选项。要使用该选项的完全正确的要求的rt.jar A JRE的目标版本(不是JDK )。

The smart way to fix that problem is to compile using the latest SDK and use the cross compilation options when compiling. To use the options completely correctly requires the rt.jar of a JRE (not JDK) of the target version.

由于小应用程序的性质,它看起来像它可以被编译为使用与Java 1.1。

Given the nature of that applet, it looks like it could be compiled for use with Java 1.1.

这篇关于不支持的版本MAJOR.MINOR 52.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆