#Java decompiled jar

1 messages · Page 1 of 1 (latest)

carmine urchin
#

Is there any other way to edit a decompiled class from a jar in intellij other than copying to a separate class. I want to work with them there and then why is it read-only ?

ionic deltaBOT
#

<@&987246399047479336> please have a look, thanks.

#

Here is an AI assisted attempt to answer your question 🤖. Maybe it helps! In any case, a human is on the way 👍. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.

#
TJ-Bot
Is there any other way to edit a decompiled class from a jar in intellij other than copying to a separate class. I want to work with them there and then why is it read-only ?

In IntelliJ, when you decompile a class from a JAR file, it is opened in a read-only mode by default. This is to prevent accidental changes to the original JAR file.

To make changes to the decompiled class, you can copy the code to a new class within your project. This allows you to edit and make modifications to the code without affecting the original JAR file. You can then work with the copied class as you would with any other class in your project.

Alternatively, if you need to make quick changes or test something out without copying the code, you can use IntelliJ's scratch files feature. Scratch files allow you to write and run code without creating a formal project or file structure. You can create a new scratch file, paste the decompiled code into it, make your changes, and test them out.

Overall, while editing decompiled classes directly from a JAR file in IntelliJ is not recommended due to read-only restrictions, there are ways to work around this limitation by copying the code to a new class or using scratch files for quick edits and tests.

drifting gorge
#

It's not easy to recompile decompiled code correctly. As such you can't just edit the decompiled code (it doesn't actually exist). For what purpose do you want to edit the code? There are various tools for different use cases

carmine urchin
#

Instead of copying the code doing a ctrl + a and pasting it to another class once extracted it's quite tedious especially when you are debugging changes and constantly reverting as your problem solving @drifting gorge

drifting gorge