• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Decode the .class file without using any software

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use Reflection API.
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43081
77
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic