Home > front end >  How to edit a .class file
How to edit a .class file

Time:06-13

I'm somewhat of a beginner in java and I want to edit a .class file just to change something from "true" to false. I'm using Eclipse to do so, but I only could find a JBC text editor, which works, but not all the time.

https://dev.bukkit.org/projects/call-duty-zombies

^ I want to edit this plugin for Minecraft, specifically in this directly:

com - theprogrammingturkey - comz - game - managers - PowerUpManager.class

I understand you can decompile this file into a .java file, but after that, how do I even get it back to a .class file so it can be recognizable to read?

EDIT: Line 65 is what I want to change.

CodePudding user response:

You are likely going to have more luck editing the source code itself. After you do your editing, compile it and do as you wish.

CodePudding user response:

You can use something like Recaf to decompile the .class and patch it on the fly. Since it probably isn't obfuscated, this will most likely not raise issues.

  • Related