It's not a secret anymore!
The moose likes Beginning Java and the fly likes class file viewer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "class file viewer" Watch "class file viewer" New topic

class file viewer

vivien siu
Ranch Hand

Joined: Nov 10, 2005
Posts: 143
Hi guys, is there any software/freeware to view .class files?

I'm not available, my BF's name is WORK.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
The simplest option is to use the "javap" command line tool that comes with the JDK.

If you're looking for a GUI, check out jclasslib.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15081

Well, what exactly do you mean with "viewing .class files"?

There are a number of Java decompilers available, which can translate the byte code in a class file back to source code (or something that looks like the original source code).

For example: DJ Java Decompiler, JAD. Search for "Java decompiler" on Google for more.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
vivien siu
Ranch Hand

Joined: Nov 10, 2005
Posts: 143
yup I was looking for a java decompiler software, thanks!
Srinivas Kalvala
Ranch Hand

Joined: Oct 20, 2005
Posts: 257


Some people obfuscate the code, so dont believe the code generated by the decompiler as such. Just have some hands on work ....
Peter Chase
Ranch Hand

Joined: Oct 30, 2001
Posts: 1970
And remember that it is illegal and/or immoral to decompile a third-party class file, to try to replicate, crack or alter it, against the wishes and/or licence of the third party.

Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
vivien siu
Ranch Hand

Joined: Nov 10, 2005
Posts: 143
It's ok Peter, I'm just looking at some old codes done by my colleagues. There are only .class files available in the server.
I agree. Here's the link:
subject: class file viewer
It's not a secret anymore!