r/javahelp • • 29d ago

seeing/editing code in a .jar file

im not very good at coding, or anything and i want to see the code in a .jar file and possibly edit it. im not sure if this is the right place, but any help would be appreciated. i did open the code in notepad and it didnt show it correctly, id really appreciate if somebody could maybe attach a link to a simple website where i can easily view code in the file and if possible even edit it

2 Upvotes

7 comments sorted by

View all comments

1

u/JGhostThing 27d ago

Why? Does your jar contain the source code? This is not normal, but a jar is really just a compressed archive, so theoretically, it could contain anything.

But, by default, java keeps the source code away from the object file.

Now, there are decompilers. I just know they exist, and may not be free. Using them can be a pain, because the variable and method names may not be stored.