Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7626305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:18:28+00:00 2026-05-31T05:18:28+00:00

I was trying to edit a single byte in an extracted Eclipse plugin jar

  • 0

I was trying to edit a single byte in an extracted Eclipse plugin jar file. I noticed that after I re-compressed the files as a jar, the resultant file was larger than the original (only 1%) and that the plugin didn’t work. Eclipse booted, but shut down silently after selecting a workspace. Rolling back to the original plugin allowed it to start successfully.

I then tried uncompressing, then compressing the plugin (not changing anything) and the resultant jar file was still bigger than the original, and also didn’t work.

$ jar -xf temp/in.jar

then

$ jar -cf out.jar temp/*

$ du in.jar out.jar
4216    in.jar
4236    out.jar

I guess this might be due to timestamps being changed, but I didn’t think that this would stop eclipse from accepting it.

So my question: Is there a way to uncompress a jar, change a byte, and compress it without changing the jar significantly?

I’m using Ubuntu 10.04 – 64 bit:

Linux user 2.6.32-38-generic #83-Ubuntu SMP Wed Jan 4 11:12:07 UTC 2012 x86_64 GNU/Linux

When looking at the jar’s table, there appears to be a different order:

$ jar tf in.jar | head -n 5
META-INF/
META-INF/MANIFEST.MF
com/
com/android/
com/android/ide/

$ jar tf out.jar | head -n 5
META-INF/
META-INF/MANIFEST.MF
about.html
about.ini
about.properties

Is there a way to order them differently within the jar?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T05:18:29+00:00Added an answer on May 31, 2026 at 5:18 am

    Obtaining a different size after recompression is normal if one file has been modified. But if nothing has been modified, maybe you haven’t the same root directory in both archives.

    Run the following two commands and post the result here (the first lines only):

    jar tf in.jar
    jar tf out.jar
    

    These commands list all files in Jar files with their path.

    Have you tried to update only the modified file using the following command:

    jar uf in.jar TheFileYouModified
    

    TheFileYouModified must be the same path as in the JAR file. For example to replace com/android/Example.class you have extracted in /tmp/injar/ and modified :

    jar uf in.jar -C /tmp/injar com/android/Example.class
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Edit: I am trying to bind a single view model object that contains a
I'm trying to single source a form page which can be in edit mode
I am trying to get the Edit with Vim context menu to open files
I'm trying to copy a single file using copy-item to a remote computer using
EDIT NOTE: I've not been very clear. I'm trying to start from a single
I'm trying to edit configuration file in Java. What I really need to do
I am trying to read a single file from a java.util.zip.ZipInputStream , and copy
EDIT: I stuck in a single call to manually retain the array right after
I'm trying to do something that should be very common: add/edit a bunch of
Edit--@Uri correctly pointed out that this was an abuse of annotations; trying to actually

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.