Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jan 10th, 2006, 2:33 AM   #1
tsofras
Programmer
 
tsofras's Avatar
 
Join Date: Jul 2005
Location: Athens,Greece
Posts: 39
Rep Power: 0 tsofras is an unknown quantity at this point
Find the source from a compiled...

Hi there, is there any chance that i can get the source from a compiled Java class?
tsofras is offline   Reply With Quote
Old Jan 10th, 2006, 2:40 AM   #2
tsofras
Programmer
 
tsofras's Avatar
 
Join Date: Jul 2005
Location: Athens,Greece
Posts: 39
Rep Power: 0 tsofras is an unknown quantity at this point
I know it is not right to double post but i found the solution, thx anyway
tsofras is offline   Reply With Quote
Old Jan 10th, 2006, 2:50 AM   #3
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,223
Rep Power: 5 grumpy is on a distinguished road
Getting the original source would be virtually impossible: a compiled Java file does not carry around comments from the original source, and there are plenty of cases in which there is more than one way of coding something to produce the same bytecode. For example, there is no Boolean type in bytecode, and the Java compiler maps all operations with booleans to integer operations, so it is not always possible to correctly work backwards from bytecodes to source code that uses Booleans.

That said, if you google for "java decompiler", you will be able to find some programs that do the job (eg get back from a compiled class file to a source file that does approximately the same thing) and some information on comparing different decompilers. There are some products available free, and some you have to pay for.
grumpy is offline   Reply With Quote
Old Jan 10th, 2006, 2:56 AM   #4
tsofras
Programmer
 
tsofras's Avatar
 
Join Date: Jul 2005
Location: Athens,Greece
Posts: 39
Rep Power: 0 tsofras is an unknown quantity at this point
Thx grumpy i had already downloaded jad decompiler and it is working perfect
tsofras is offline   Reply With Quote
Old Jan 10th, 2006, 7:42 AM   #5
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4 Polyphemus_ is on a distinguished road
I have used a decompiler once as well, and it worked great.
Polyphemus_ is offline   Reply With Quote
Old Jan 10th, 2006, 9:16 AM   #6
ReggaetonKing
Sexy Programmer
 
ReggaetonKing's Avatar
 
Join Date: Nov 2005
Location: New Jersey
Posts: 891
Rep Power: 3 ReggaetonKing is on a distinguished road
Send a message via AIM to ReggaetonKing
yeah, a decompiler may not exactly have the orgininal code itself but its really no difference and it works just as good.
__________________
I would love to change the world, but they won't give me the source code!
ReggaetonKing is offline   Reply With Quote
Old Jan 10th, 2006, 5:55 PM   #7
alcdotcom
Programmer
 
Join Date: Jan 2006
Location: Dallas, TX
Posts: 49
Rep Power: 0 alcdotcom is on a distinguished road
Just beware of copyright infringement. If someone made it closed source, they may have done so for a reason. I wouldn't have a poblem with anyone viewing my source, but that's just me.
__________________
Java Blog
alcdotcom is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:05 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC