• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

If u can decompile .class , then whats use?

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If u can decompile .class file with so many decompilers available in market , what is the use of .class file concept when u can create a source for that .class file which might be created my other compiler?What about security?
 
author
Posts: 621
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I think the whole point of compiling is to translate human-readable code into bytecode (in the case of Java) so that the JVM can understand the instructions. The purpose of compilation has nothing to do with security, that's simply a by-product of the translation. To prevent de-compilation, you can obfuscate the code (using a obfuscating tool) to make decompilation more dificult.
Sean
 
vivek bedekar
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Sean MacLean:
Well, I think the whole point of compiling is to translate human-readable code into bytecode (in the case of Java) so that the JVM can understand the instructions. The purpose of compilation has nothing to do with security, that's simply a by-product of the translation. To prevent de-compilation, you can obfuscate the code (using a obfuscating tool) to make decompilation more dificult.
Sean



thank you Sean,
But if u can check source code of all classes in jdk Package and u can make changes in that then u can create ur own jdk unlike with .exe files?
plz tell me more about that obfuscating tool .
thanking u
vivek v. bedekar
 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An obfuscating tool will go through your source file and it will rename every variable that you use to something very unreadable and difficult to follow. For example, if you have a variable named currentCount, the obfuscator may rename it to something like hix83md, making it hard to understand. You could not tell by the variable what its use was, you would have to completely read through the code and try to understand how it had been used. This is good because it discourages decompiling because it is incredibly time consuming to rename all of the variables.
------------------
I hope its helps, feel free to email me noahcarroll@juno.com
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, anyone can create their own JDK. Sun lets us see everything so that we can all learn exactly how their technology works.
I encourage you to stay away from obfuscating. Java has grown because of its openness, it would be counterproductive to the community in general if the idea of hiding source code became the norm. You are biting the hand that feeds you.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!