Archived

This topic is now archived and is closed to further replies.

demonrealms

Problem with the .class

Recommended Posts

Hi everyone, I got a java applette off a friend, and now my computer got re-formatted and now everythings gone except the .class file. Can any of you tell me if there''s a way to open the .class file and edit it? He had something I could to to edit his java file but now that''s gone too -_- Thanks everyone!

Share this post


Link to post
Share on other sites
All I have to say is that it''s very suspicious for you to have your computer formatted and JUST the CLASS file remains. Why don''t you just ask your friend for all the files again? This is too suspicious, and therefore I dont think Im going to try and help.

Share this post


Link to post
Share on other sites
I understqand what your saying. I should have been more clear. As too I''m kind of sounding like a person whose trying to crack somthing. As for having the .class file, I had that backed up on a floppy. I couldn''t get the rest of the files to fit on there. As to why I can''t get the files from my friend, He''s recently moved and I can''t get a hold of him til he decides to call me somtime this year.

Share this post


Link to post
Share on other sites
that was almost too much for my bullshit detector.

so, you took the time to back up a .class file (but not the important parts), then reformatted your computer? if so, brilliant move on your part. your friend doesn''t have AIM, ICQ, etc?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hey, guys!!! I believe him. This is how you do it. First you go to notepad, then you open the class file. Then you type in your changes and then you save. Voila

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
Hey, guys!!! I believe him. This is how you do it. First you go to notepad, then you open the class file. Then you type in your changes and then you save. Voila


Oh jeez!

The .class file is the compiled binary; you can't just open it in notepad and edit it and expect it to work.


EDIT: rephrasing.

[edited by - Anthony Serrano on January 18, 2004 5:57:45 AM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
The last AP was almost right: what you actually do is get the JVM bytecode spec from sun, then open the .class file in your favourite hex editor; its all plain sailing from there

Share this post


Link to post
Share on other sites
It is not as hard. First you must download Java SDK from Sun microsystems, then you should tell us what that class file was.
Best and easier way would be simply create java source file and type it again. Unformat is probably out of question right?
Other ways are considerably more difficult.
What was that program?


BTW if you really tried to learn some disassembly, there are resources around there. And a lots of them. (Much better than majority of answers that you could get on this forum)

I for example just recently deleted source tree. I get it back by recovery program. Yuck some programs have it sooo easy.

Share this post


Link to post
Share on other sites
quote:
Original post by demonrealms
His parents only let him on the internet to do research for school since they''re afraid he''ll download porn.

heh heh, that would end the world, eh?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Oh so helpful, you lot!

Java class files are easily decompiled, unless your friend ran it through a program that messed with the internal format in order to give decompilers a hard time of it. My current decompiler of choice is JAD - Google should rapidly locate it for you.

The decompiled source isn''t exactly the same as the original source, as information like local variable names and some structure is lost. The compiler might have unrolled loops and inlined routines, making things more difficult for you. If your friend ran it through an obfuscator, prepare to spend some time picking through things working out what goes where.

Make your change, save, and recompile with your JDK. Viola!


Denying someone info like that is just silly. Decompilation of Java source is a well-known and well-documented process, so he''ll find out sooner or later. Denying such information is like refusing to tell someone whether or not it''s raining outside. After deciding you''re being an idiot he''ll just go and look himself. May as well be polite about it!

--cfmdobbie

Share this post


Link to post
Share on other sites
Thanks, but now I''ve run into another problem. While trying to use Java++ form Visual Studio, I copied and pasted the code from the class into my own applet to make things easier. But now....it doesn''t work. It just tells me not all applications may be updated. What do I do? Sorry, but I don''t know much about Java -_- And thanks for all your help so far everyone.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Now that we''re on the subject, how do I get this stupid trial error to dissapear? I uploaded it to this persons site so you could download it and figure it out. Thanks!
<a href="http://www.demonrealmstudios.com/ultrasnake/Applet1.java">Click here</a>
<hr>
It keeps coming up with this stupid message that displays: Trial Version www.apy.com What''s that? That wasn''t there before when I made this program about a month ago. Can i get it to go away?

Share this post


Link to post
Share on other sites
Now I've downloadedc this program that does this(DeCafe Pro) but it won't let me copy the code over unless I pay 30.00. Is there any way for me to get around this(non-hacking)? Thanks.

[edited by - demonrealms on January 19, 2004 1:39:01 AM]

Share this post


Link to post
Share on other sites
quote:
Original post by demonrealms
Now I''ve downloadedc this program that does this(DeCafe Pro) but it won''t let me copy the code over unless I pay 30.00. Is there any way for me to get around this(non-hacking)? Thanks.


Pay them 30.00.

Share this post


Link to post
Share on other sites
quote:
Original post by Zahlman
... you seem not to have picked up on the joke :/


Sorry, it was posted under "Anonymous Poster". One can never tell if an AP is joking or not.

Although it would have been funny if he fell for it and posted something like:

"OMG! I opend the .class file in Notepad like you said. What do all the boxes and funny letters mean?"

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
Now that we''re on the subject, how do I get this stupid trial error to dissapear? I uploaded it to this persons site so you could download it and figure it out. Thanks!
<a href="http://www.demonrealms tudios.com/ultrasnake/Applet1.java">Click here</a>
<hr>
It keeps coming up with this stupid message that displays: Trial Version www.apy.com What''s that? That wasn''t there before when I made this program about a month ago. Can i get it to go away?


lololololololololol!!!11 one one!

Share this post


Link to post
Share on other sites
quote:
Original post by demonrealms
Oh yes and to billybob. No he doessn''t have AIM, MSN IM, etc. His parents only let him on the internet to do research for school since they''re afraid he''ll download porn.


That''s the right way...how can someone force to download some. ^_^. When I talked about downloading J2SDK SE from java.sun.com I wan''t joking. If you look around that site you could find even nice tutorial. Read it use it. (part of J2SDK is of course... guess what.) J++ is something else than Java. Or rather say current Java.

Share this post


Link to post
Share on other sites