# How can I open Java .class files in a human-readable way?

I'm attempting to identify what a Java applet is class documents is doing under the hood. Opening it up with Notepad or Textpad simply reveals a number of gobbledy - gook.

Exists any kind of means to wrangle it back right into a rather - legible layout so I can attempt to identify what it is doing?

• Setting = = Windows w/ VS 2008 mounted
133
2022-06-27 17:00:33
Source Share

If the class documents you intend to check into is open resource, you need to not decompile it, yet rather attach the resource files straight right into your IDE. in this way, you can simply watch the code of some collection class as if it were your very own

1
2022-06-30 00:25:46
Source

There is no demand to decompile Applet.class. The general public Java API courses sourcecode features the JDK (if you pick to install it), and also is much better legible than decompiled bytecode. You can find pressed in src.zip (situated in your JDK installment folder).

0
2022-06-27 17:58:00
Source

You require to make use of a decompiler. Others have actually recommended JAD, there are various other alternatives, JAD is the most effective.

I'll resemble the remarks that you might shed a little bit contrasted to the initial resource code. It is mosting likely to look specifically amusing if the code made use of generics, as a result of erasure.

1
2022-06-27 17:57:18
Source

1
2022-06-27 17:54:34
Source

jd-gui is the most effective decompiler presently. it can take care of more recent attributes in Java, as contrasted to the obtaining - messy JAD.

225
2022-06-27 17:53:18
Source

That is assembled code, you'll require to make use of a decompiler like JAD: http://www.kpdus.com/jad.html

1
2022-06-27 17:19:09
Source

You desire a java decompiler, you can make use of the command line device javap to do this. Additionally, Java Decompiler HOW-TO defines just how you can decompile a class documents.

7
2022-06-27 17:18:37
Source

what you are seeking is a java de - compiler. I advise JAD http://www.kpdus.com/jad.html It is free for non business usage and also does the job.

Keep in mind: this isn't mosting likely to make the code specifically the like what was created, ie. you are mosting likely to shed remarks and also perhaps variable names, so it is mosting likely to be a little tougher than simply reviewing regular resource code. If the programmer is actually deceptive they will certainly have obfuscated their code too, making it also harder to read.

2
2022-06-27 17:18:30
Source

As recommended you can make use of JAD to decompile it and also watch the documents. To make it less complicated to read you can make use of the JADclipse plugin for eclipse to incorporate JAD straight to overshadow or make use of DJ Java Decompiler which is a lot easier to make use of than command line JAD

0
2022-06-27 17:17:55
Source

If you do not mind reviewing bytecode, javap needs to function penalty. It becomes part of the typical JDK installation.

Usage: javap <options> <classes>...

where options include:
-c                        Disassemble the code
-classpath <pathlist>     Specify where to find user class files
-extdirs <dirs>           Override location of installed extensions
-help                     Print this usage message
-J<flag>                  Pass <flag> directly to the runtime system
-l                        Print line number and local variable tables
-public                   Show only public classes and members
-protected                Show protected/public classes and members
-package                  Show package/protected/public classes
and members (default)
-private                  Show all classes and members
-s                        Print internal type signatures
-bootclasspath <pathlist> Override location of class files loaded
-verbose                  Print stack size, number of locals and args for methods
If verifying, print reasons for failure

85
2022-06-27 17:17:18
Source

JAD is a superb alternative if you desire legible Java code therefore. If you actually intend to explore the internals of the .class documents layout however, you are mosting likely to desire javap. It is packed with the JDK and also permits you to "decompile" the hexadecimal bytecode right into legible ASCII. The language it generates is still bytecode (nothing like Java), yet it is rather legible and also exceptionally instructional.

Additionally, if you actually intend to, you can open any kind of .class documents in a hex editor and also read the bytecode straight. The outcome corresponds making use of javap.

0
2022-06-27 17:16:29
Source

Using Jad to decompile it is possibly your ideal alternative. Unless the code has actually been obfuscated, it will certainly generate an all right outcome.

3
2022-06-27 17:14:39
Source