T
T
Tolik2014-05-21 18:21:15
Java
Tolik, 2014-05-21 18:21:15

How to decompile and then recompile the jar with some changes?

There is a jar file (mod for minecraft) that I want to modify (remove some methods so that the laser does not work and you can craft a thermal centrifuge, which is prohibited on the server due to the laser). I decompiled via jd-gui and found the right class. I commented out the excess. But it is not possible to compile back (you need a whole folder). Maybe there is a program in which you can do everything at once (decompile, change, compile)? Or how?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Vladimir Smirnov, 2014-05-22
@Diel

In the development environment, include the source jar of the decompiled class as a library

L
lookid, 2014-05-21
@lookid

Compile again as a full mod.
www.mikaellinusson.com/blog/2012/09/30/how-to-make...

E
Evgeny Ulyanov, 2014-05-22
@eoltemniyelf

If it is possible to change the classpath when the application starts, then save the changed class in a separate jar-nickname and put this jar-nickname in the classpath before the original one (which you passed).
The loader will find your class first, load it, and no longer load the original class.

S
SEOELSI, 2015-09-23
@SEOLSI

if Applied Energistics is installed on the server, then you can craft everything in the ME terminal

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question