Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I edit a .jar file? [duplicate]

Tags:

java

mobile

jar

So I have a jar file with one .class file on it. I just need to change some words in the file. What program should I use?

I want this to work for my phone.

like image 347
user594568 Avatar asked Jan 29 '11 14:01

user594568


People also ask

How do you decompile a JAR and edit it?

Before opening jar file just change the extension of jar to zip file and then extract that particular class file that you want to edit , then decompile it using any decompiler ,make the changes , compile it back and then finally put it back in the zip file. Hope it helps.

How do I open a jar file with edit code?

A jar file is a zip archive. You can extract it using 7zip (a great simple tool to open archives). You can also change its extension to zip and use whatever to unzip the file.


1 Answers

Here's what I did:

  • Extracted the files using WinRAR
  • Made my changes to the extracted files
  • Opened the original JAR file with WinRAR
  • Used the ADD button to replace the files that I modified

That's it. I have tested it with my Nokia and it's working for me.

like image 164
Vaibhav Avatar answered Sep 21 '22 06:09

Vaibhav