Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to edit .jar file in Android Studio

How can I edit code in a .class file in a .jar file using Android Studio? I have already tried to edit it of course. The class I am trying to edit is a read only for some reason.

like image 885
Taylor Courtney Avatar asked Apr 06 '15 19:04

Taylor Courtney


1 Answers

Jar files are compressed archives (zipped files) of .class files( and few other resources). .class files are compiled .java files. You can not edit a compiled file in normal situation unless you decompile to get source code, edit the code and recompile again.

Decompiling is a tedious process, thus getting a source code is the best option here.

Note: You can rename the .jar file to a .zip file and can open it using any compression tool such as winrar or winzip to see the content.

like image 101
noob Avatar answered Oct 01 '22 20:10

noob