Please help! I ran a program and redirected the output to a flat file, but I named that file the same as the program name. So I overwrote my program, Selection.java, with the text of the output by saying java Selection > selection.java. Anyone know the DOS command to convert the .class file back to the .java file? EDIT: I'll try to find a decompiler at downloads.com. Isn't javap supposed to do this? It does something, but it doesn't create the .java file when I run it in \bin. Thanks, Doug [ November 18, 2002: Message edited by: Doug Wolfinger ] [ November 18, 2002: Message edited by: Doug Wolfinger ]
just downloaded and used mocha. it is a basic tool. it is a very cool tool. i wish i had it a few year ago.
what i did to get mocha to work 1. downloaded mocha.zip 2. copied mocha.zip to c:\jdk1.3.1\lib 3. add c:\jdk1.3.1\lib\mocha.zip to my CLASSPATH CLASSPATH=.;c:\jdk1.3.1\lib\mocha.zip 4. from a dos prompt i typed java mocha.Decompiler -v -o test63.class *. a text file called test63.mocha is created that's it... [ November 20, 2002: Message edited by: Monty Ireland ]
Multi Platform Database Developer & DBA on E.S.T.
Joined: Jul 27, 2002
Thanks, all. I have a beta Mocha installed but can't get it to work, so I used DJ. The decompilation was very pleasant but I noticed some disturbing things afterwards. For one thing, I couldn't get into my c:\ where the executable was located after the decompilation. It was alarming. The software locked up the c:\ somehow. So I closed Win Explorer and everything was fine when I reopened it. And I noticed that all class files had the DJ icon. I decided to get rid of it, and deleted the DJ files that made all the class files associate with it. I didn't realize the source code would be neatly formatted by the decompiler, so that was a nice surprise. If the new version of Mocha works I might go with that; it operates from the dos command line, so it should be less obtrusive. [ November 19, 2002: Message edited by: Doug Wolfinger ]