Is there a Java equivalent to .NET Reflector?
Edit: more specifically, decompiling is what I'm after.
Is there a Java equivalent to .NET Reflector?
Edit: more specifically, decompiling is what I'm after.
From what little I know the functionality of .NET Reflector is available in pretty much all Java IDEs, including Eclipse. Just add a jar
file to a projects and you can browse its classes just as you browse your own classes.
For the decompiler aspect (as opposed to the pure class browser) there are some alternatives as well. The JDK tool javap
only decompiles to byte-code so it isn't really useful to get to the source code (but might help with getting an understanding of the code).
JAD is a pretty popular decompiler in the Java world and it produces compilable Java code most of the time (some bytecode sequences aren't easily translatable to valid Java 'though, so some corner cases exist).
See How do I decompile Java class files? There's a link there to JD-GUI, which seems to be about what you're looking for.
Edit: Also see Open Java *.Class Files.
Edit 2: And Best free Java .class viewer?, which specifically mentions .NET Reflector.
You can get JAD for decompiling .class into .java. It's pretty good at it.
If you use Eclipse get the jadclipse plugin too. You'll need to configure the path to the jad.exe. Next time you open a .class you'll see the decompiled source instead of the .class declaration. And you can browse with F3 too. It's very useful.