简体   繁体   English

小程序无法在浏览器中工作

[英]Applets not working in Browser

I have created simple Applet Example. 我创建了一个简单的Applet示例。 I have successfully created compiled and run it eclipse, but when i try to run in any of the browsers it shows.. 我已经成功创建了编译文件并运行eclipse,但是当我尝试在任何浏览器中运行时,它都会显示。

unsupported major.minor version 52.0 不支持的major.minor版本52.0

I think the problem here is that i have java SE 1.8 64 bit installed on the system but browser is 32 bit and plugin points to jre1.7 32 bit, i have installed that also still the same error. 我认为这里的问题是我在系统上安装了Java SE 1.8 64位,但浏览器是32位,插件指向jre1.7 32位,我已经安装了同样的错误。 If i forcefully try to compile my applet using 1.7 it show the following error. 如果我强制尝试使用1.7编译我的applet,则会显示以下错误。


javac: target release 1.7 conflicts with default source release 1.8 javac:目标版本1.7与默认源版本1.8冲突


how should I resolve this...any suggestions? 我应该如何解决这个...任何建议?

I made it working by compiling with the lower version of Java. 我通过使用较低版本的Java进行编译使其工作。

You can use javac -target 1.6 <source files> 您可以使用javac -target 1.6 <source files>

If you're using some IDE to build jars, please specify which one. 如果您使用某些IDE来构建jar,请指定哪个。

Please see This link for details. 请参阅链接以获取详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM