John Joe
John Joe

Reputation: 12803

Edit a .jar file in linux

I have a jar file and I use vim to view my JAR contents, everything look fine. But when I move my jar and also some important file to my friends pc which is run in centos,the contents jar file not readable which look similar to this !

ð<91>H¶<88>²Ò^S$ß^M<92>Ç^D®R<88>k´NÐ|^]<83>¸aXnâ<96>Á&q^[ãF^N½^^s^F^?^@PK^C^D
^@^@^@^H^@<8f>VJJßê¥=s^B^@^@^?^D^@^@%^@^@^@rh/com/app/writer/AgingWriter$2.class<85>S^?O^SA^P}^K¥G<8f>^Sj^Q+*òCÔR<94>EDEÀ*6<90><90><9c>b^B^AÿÝ^^×öàzÛÜmE?<96>$bâ^_~^@?<94>qv<8b>P!@/Ý<9d>};;óæÍîï??^?^A<98>G9^C^[^S6úp¿^W<93>6^^àa^FcxÔ<8b><82><8d>)^T3<98>Æc^[O0c<81>[<98>µð<94>!­êA29Ë0êÆuîÉ^F^WÍ&?<88>^CåÇ|¥^VDµ^]c/<91>ër^P^EªÄ0Q¸Âwj<9b>!U<96>»>Ã<80>^[Dþ<87>V£âÇ[¢^R^R<92>s¥'Âm^Q^Gz}^L¦4^M^Fg=<8a>ü¸^\<8a>$ñi9~y<9e>É9bÕgð5)  

How to solve this ?

Upvotes: 0

Views: 9703

Answers (1)

John Joe
John Joe

Reputation: 12803

First install emacs

yum install emacs

Then use below command to read the content

emacs somejar.jar

select the content and press Enter

To save and quit from the editor, press C-x C-s (Ctrl+x, followed by Ctrl+s).

Source : How To Use the Emacs Editor in Linux

P/S : Only can edit xml file

Upvotes: 3

Related Questions