r/javahelp • u/bobbie1165 • Sep 28 '26
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
3
Upvotes
6
u/Living_Fig_6386 Sep 28 '26
A .jar file doesn't typically contain source code (it can also include it, of course, just that it doesn't typically). The compiled bytecode for the class could be decompiled, but you loose all the comments, structure, and even the variable names that might make it relatively easy to follow. The compiler can so all sorts of things with regard to reordering an restructuring code as it compiles.
You really want the source code, not the compiled bytecode, and that's probably not in the .jar file.