• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Decode the .class file without using any software

 
reethu singh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi i wanted to decode the .class file to know what methods that class file contains/to view that class file but without using any software i need to do coding in java can anyone help me?
 
Surendra Kumar
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use Reflection API.
 
Winston Gutkowski
Bartender
Pie
Posts: 10257
59
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
reethu singh wrote:but without using any software i need to do coding in java...

That statement is contradictory. Java is software, so you can't do it without using software of some kind.

Reflection, as reethu said, is one possibility; but the question you should probably be asking yourself is: "why do I need to do this?". If it's for a school exercise, then fine; if you simply want to crack someone else's code in order to plagiarize it, then it isn't.

I have never, in 12 years of using Java, needed to do what you want, and Reflection is fiddly, error-prone, arcane and SLOW; so I'd think long and hard before you go down that road.

Winston
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The javap tool that comes with the JDK will show you what methods are available. Libraries like asm, jclasslib and javassist could also be useful.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic