1

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?

Jacque
  • 53
  • 1
  • 7
  • Already answered, but you might try decoding the .class file with a simple java class: http://stackoverflow.com/questions/18736163/unsupportedclassversionerror-jdks-have-same-version – Joop Eggen Jul 09 '14 at 08:32
  • *"I have an older applet I built. It naturally will not run in the browsers today."* Why not? Because it is not digitally signed? *"Also, what version of Java can i use so that my clients do not get that annoying security message"* No version that is currently supported. *"Thirdly, will HTML5 with canvas be a better choice for the applet since it really just paints a pretty grid of images?"* Definitely yes. – Andrew Thompson Jul 09 '14 at 12:31
  • I don't know why it stopped running. It was from 2009 and it just stopped displaying and gave a broken icon. I don't know about digitally signed. Back then I don't even know if we sis that since it doesn't sound familiar. It was my first real Java applet.. – Jacque Jul 09 '14 at 14:32

2 Answers2

1

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.

Chris K
  • 11,622
  • 1
  • 36
  • 49
0
  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.
Community
  • 1
  • 1
Lonzak
  • 9,334
  • 5
  • 57
  • 88