![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Jul 2005
Location: Athens,Greece
Posts: 39
Rep Power: 0
![]() |
Find the source from a compiled...
Hi there, is there any chance that i can get the source from a compiled Java class?
|
|
|
|
|
|
#2 |
|
Programmer
Join Date: Jul 2005
Location: Athens,Greece
Posts: 39
Rep Power: 0
![]() |
I know it is not right to double post but i found the solution, thx anyway
![]() |
|
|
|
|
|
#3 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,223
Rep Power: 5
![]() |
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. |
|
|
|
|
|
#4 |
|
Programmer
Join Date: Jul 2005
Location: Athens,Greece
Posts: 39
Rep Power: 0
![]() |
Thx grumpy i had already downloaded jad decompiler and it is working perfect
|
|
|
|
|
|
#5 |
|
Expert Programmer
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4
![]() |
I have used a decompiler once as well, and it worked great.
|
|
|
|
|
|
#6 |
|
Sexy Programmer
|
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! |
|
|
|
|
|
#7 |
|
Programmer
Join Date: Jan 2006
Location: Dallas, TX
Posts: 49
Rep Power: 0
![]() |
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 |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|