How to get source code from .class file( class file version is 1.2)

Arpit Garg picture Arpit Garg · Mar 30, 2016 · Viewed 10.8k times · Source

Unresolved compilation problem:

Syntax error, parameterized types are only available if source level is 1.5 or greater

I used JD GUI de-compiler but it is giving above error.

is there any way i can get source code

Answer

Bajal picture Bajal · Mar 30, 2016

Try this at the command line. It will also show the JDK version used to compile the class, in the beginning , like: major version: 52

javap -verbose <class name>