We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionGeneral Discussion,  Status › Translate Java back to PDE format for processing
Page Index Toggle Pages: 1
Translate Java back to PDE format for processing? (Read 2964 times)
Translate Java back to PDE format for processing?
Apr 18th, 2010, 1:12pm
 
I am new to processing and I really don't know much about processing/java but if I were to lose an original sketch, would it be possible to translate an executable jar file and/or .class files into (pde compatible) source code as this is all that remains of the project.
Re: Translate Java back to PDE format for processing?
Reply #1 - Apr 18th, 2010, 1:35pm
 
Essentially the answer is yes, but it probably takes some knowledge of processing.  Smiley
The annoyances are all the f's after floats (which you don't need to change) and all the public this and that etc.
Re: Translate Java back to PDE format for processing?
Reply #2 - Apr 18th, 2010, 2:40pm
 
Would anyone mind translating the code? Sad
Re: Translate Java back to PDE format for processing?
Reply #3 - Apr 19th, 2010, 1:19am
 
You can translate back .class file to .java files with a decompiler like JD | Java Decompiler.
As said, you might have to do some work to convert Java code to Processing code, although most of it can be skipped (ie. f suffix can be kept, having int instead of color doesn't hurt, you get 0xFF4455AA instead of #4455AA, and so on).
Re: Translate Java back to PDE format for processing?
Reply #4 - Apr 19th, 2010, 3:46pm
 
I found the best decompilar so far is the hard to find JAD

I have it and anyone desiring a link or needs it emailed can indicate such Smiley
Re: Translate Java back to PDE format for processing?
Reply #5 - Apr 19th, 2010, 9:58pm
 
JAD is fine, I used it a lot, but it is a bit outdated now, as it doesn't support Java 1.5 syntax (annotations, etc.). But it is a good idea to mention it anyway: both are free, so you can try both and see what output is best.
Page Index Toggle Pages: 1