Well, you see, my son has grown fond of playing games on my motoming and well there are certain games which are freely available but their source code is not. So that I always had jar files with classes, but no java files. And well, my apple of eyes has certain problems with some games "papa, ye nahi chal raha", "papa ye sirf nokia ke liye hai". And to be very honest, I am not the world's best programmer so I can't really churn out code for a brand new game for him. But after working in software companies for 8 years, I have learnt a lot about code reusability and how much easier it is to understand a given piece of code and doing changes on it :-)
Now, with a jar file of classes, I can't do much, can I? So, I started searching for java decompilers freely available on net. I ran into JDEC 2.0 and well I tried it. it gave me mixed success. For all java games fanatics, it is common news that game developer of asteroids has placed the source code freely available. So for the class file of asteroid, JDEC ran swooningly well. But for another game, where the name of file was a.class, it gave an exception "string index out of range" and it kept giving this error for other files that i was interested in. I couldn't decompile any other single file using JDEC, it was that bad. And I kept getting the same error. The error was always in JDEC source code file and to my surprise I found that I have only the class files in JDEC folder. and so guess what, i turned the tool on itself. When JDEC tool finished decompiling the error throwing file, I got a java file but of course I couldn't find the error. The line numbers had been mashed up or something like that so I couldn't locate the error throwing statement and so to bring a long story to end, JDEC has been totally ineffective for me.
And so now I start again. I see that there is another tool called JOD which I will try now. More updates later...
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment