0

I have a class file, is it possible to check what version of the JDK it was compiled in?

The class file a servlet and it's being execute in a JSP page. In the JSP page, can I do a response.write of the class file JDK version that it was compiled in?

firebird
  • 3,461
  • 6
  • 34
  • 45
  • I don't think there is a way to do this from inside the JVM. You'll have to load the servlet class and read the version from the class file yourself. See [this question](http://stackoverflow.com/q/1293308/658907). – matts Aug 02 '13 at 18:18

1 Answers1

2

You can try something like this:-

javap -verbose MyClass