The javap command takes class-names without the .class extension. Try
C:\> javap -c ClassName
javap will however not give you the implementations of the methods in java-syntax. It will at most give it to you in JVM bytecode format.
To actually decompile (i.e., do the reverse of javac) you will have to use proper decompiler. See for instance the following related question:
- The final release of JSR 176, defining the major features of J2SE 5.0 (Java SE 5), has been published on September 30, 2004.
- The lastest Java version supported by JAD, the famous Java decompiler written by Mr. Pavel Kouznetsov, is JDK 1.3.
- Most of the Java decompilers downloadable today from the Internet, such as “DJ Java Decompiler” or “Cavaj Java Decompiler”, are powered by JAD: they can not display Java 5 sources.
Java Decompiler (Yet another Fast Java decompiler) has:
- Explicit support for decompiling and analyzing Java 5+ “.class” files.
- A nice GUI.
It features an online live demo version that is actually fully functional! You can just drop a jar file on the page and see the decompiled source code without installing anything.
There are a few decompilers out there… A quick search yields:
- Procyon: open-source (Apache 2) and actively developed
- Krakatau: open-source (GPLv3) and actively developed
- CFR: open-source (MIT) and actively developed
- DJ Java Decompiler
And many more.
These produce Java code. Java comes with something that lets you see JVM byte code (javap).