简体   繁体   中英

Is there a way to find out what version of Java an applet was compiled in

I have an older applet I built. It naturally will not run in the browsers today. Is there a way to find out what version of Java it was compiled in.

Also, what version of Java can i use so that my clients do not get that annoying security message, "are you sure you ant to run this"

Thirdly, will HTML5 with canvas be a better choice for the applet since it really just paints a pretty grid of images?

Unpack the jar and check the MANIFEST file. It should have a header in there saying what version of java was used.

Example META-INF/MANIFEST.MF

Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: jleibiusky
Build-Jdk: 1.5.0_22

Build-Jdk: 1.5.0_22 is the bit that you are looking for.

  1. If you don't have a manifest you can use the ClassVersionChecker , use javap or a hex editor.
  2. The changes have been introduced since Java 7u21 (6u45 and and 5u45). So any version before that will do. However from a security perspective it is not wise to run such an old version!
  3. Yes, definitly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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