954,518 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

[help]How to recompile java to class?

I have a program with multiple JAR files. I need to edit only 1 class in only 1 jar file. I've decompiled them to *.java files, edited, but I can't recompile them. I tried javac name.class but I get a ton of errors.

any help?

Mareshal
Newbie Poster
5 posts since Oct 2009
Reputation Points: 9
Solved Threads: 0
 

You decompiled them? Implying the source code wasn't yours, and we don't give help with reverse engineering.

BestJewSinceJC
Posting Maven
2,772 posts since Sep 2008
Reputation Points: 874
Solved Threads: 354
 

Come on. I am student 3rd degree, at a programming university.

Let me tell you the entire story. Today, at our java lab, our teacher told us is almost impossible to modify a jar executable. And I told him I can do this until tomorrow. The java program I've decompiled is a simple text editor, and my task is ONLY to change the top menu and pack it back. This is why I need some advices.

I don't want to hack any program. Yes, source code is not mine, the teacher gave it to me. This could be my best chance to get a 10 at java lab, and I really need it.

Now can you help me?

Mareshal
Newbie Poster
5 posts since Oct 2009
Reputation Points: 9
Solved Threads: 0
 

Help you to cheat......NO. My theory here is that your tutor gave you the .class files to see how a program works, and you are then meant to write the code yourself. You will not learn java by decompiling .class files and submitting them as your project. Forgive me if I am wrong here, but I have seen this stunt before...

majestic0110
Nearly a Posting Virtuoso
1,328 posts since Oct 2007
Reputation Points: 256
Solved Threads: 72
 

Why you people don't understand? IS JUST A SIMPLE BET WITH MY TEACHER. If I can modify his java text editor somehow, anything, a simple char, I can get a 10 for that lab. Does it mean I cheat if I prove him I can do something he can't?

Mareshal
Newbie Poster
5 posts since Oct 2009
Reputation Points: 9
Solved Threads: 0
 

Well, evidently you it's something that you cannot do because you are here asking how to do it. I'd say you lost the bet.

Ezzaral
Posting Genius
Moderator
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
 

I'm not arguing with you, or saying that I do or do not believe you, but reverse engineering software is not something we typically help with here.

BestJewSinceJC
Posting Maven
2,772 posts since Sep 2008
Reputation Points: 874
Solved Threads: 354
 

You don't help because you don't know. Hehe, I've recompiled the program ;) . thank you people, FOR NOTHING. And...I won the bet.

And a good programmer should know reverse enginering, otherwise he can't protect his programs :)

Mareshal
Newbie Poster
5 posts since Oct 2009
Reputation Points: 9
Solved Threads: 0
 
Why you people don't understand? IS JUST A SIMPLE BET WITH MY TEACHER. If I can modify his java text editor somehow, anything, a simple char, I can get a 10 for that lab. Does it mean I cheat if I prove him I can do something he can't?


You made the bet with your teacher not we. If you want to win the bet then do what you promised:And I told him I can do this until tomorrow


What should we help you for a bet?
If you had a problem with an assignment we would have helped since this is the purpose of this forum

javaAddict
Nearly a Senior Poster
Team Colleague
3,329 posts since Dec 2007
Reputation Points: 1,014
Solved Threads: 448
 
You don't help because you don't know.

You are right, all the trained professionals here don't know how to recompile and you, a student, do.Hehe, I've recompiled the program ;) . And...I won the bet.

Good for you. I hope you did it on your own without any help and you won the bet fair and square.

javaAddict
Nearly a Senior Poster
Team Colleague
3,329 posts since Dec 2007
Reputation Points: 1,014
Solved Threads: 448
 

yea yea yea...bla bla bla

Mareshal
Newbie Poster
5 posts since Oct 2009
Reputation Points: 9
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You