How do you remove META-INF from minecraft.jar without any manual file deletion?

jar
270

Solution 1

I'm not certain what you mean by "manual file deleting", but here's how to delete the META-INF folder.

You must open minecraft.jar in a program which can edit .zip files (such as 7-zip), then delete the META-INF folder as you would anything else. This should not require administrator privileges, as minecraft.jar resides inside your home folder, over which you have almost total control. On Windows, you can reach the correct folder by pressing Win+E (the Windows key is the one that looks like the Start menu) and typing %AppData%\.minecraft\bin in the text box at the top of the window which appears.

If you're not comfortable doing this yourself, you might ask someone with more computer experience to help you. A program or script could be written to do it for you, but that would require the installation of additional software on your computer (which typically does require administrator rights).

Solution 2

In addition to Ben Blank's answer, if you cannot install a zip application as you do not have administrator rights, you could just rename mincraft.jar.

As a .jar file is just a .zip file under another name, and if you are using Windows, which can now open .zip files as if they were directories, you can just rename minecraft.jar to minecraft.zip. You can now delete META-INF without installing any further apps. After this, be sure to rename the .zip back to .jar.

Linux should also have native zip readers, depending on the distro, and the minecraft data directory is in your /home/[usr]/.minecraft directory, which may be hidden from your file explorer UI as it starts with a dot.

Share:
270
vinod
Author by

vinod

Updated on September 18, 2022

Comments

  • vinod
    vinod over 1 year

    I am deleting the files in all the directories and subdirectories using the command below:

    find . -type f -name "*.txt" -exec rm -f {} \;
    

    But I want to know which are the files deleted along with their paths. How can I do this?

    • Admin
      Admin about 10 years
      The problem with<u> <i> Bin</i> </u>Is that sometimes it can't be found in folders. And if you manually delete meta-inf with winrar, it says that the archive is corrupt. It's not just my computer, because I have tried this multiple times on multiple computers.
    • ianc1215
      ianc1215 about 10 years
      I can make a pretty good guess that if you are deleting the META-INF you are playing with mods. Right? Are you using minecraft Forge? If so are running 1.5.x or 1.6.x? If so use the installer which will install forge for you and delete the META-INF and do a little house cleaning.
    • ianc1215
      ianc1215 about 10 years
      When you mean you are not able to install new software do you mean you are not allowed to modify the system or you require elevation to do so? If so you are sort of in luck. As long as you have the JVM installed minecraft should just run. You will need to store the minecraft files in a place where you have access to read and write. Byt the sound of it that is not on the C:\ drive.
  • Maxpm
    Maxpm over 12 years
    Side note: In Ubuntu, you can show "dot files" in the GUI by pressing Ctrl+H.
  • lagerdalek
    lagerdalek over 12 years
    ... or by pressing ctrl+L after clicking in a directory (in Gnome, at least), you can edit the location, and manually add the .minecraft extension
  • Pacerier
    Pacerier over 9 years
    @Maxpm, What do you mean by dot files?
  • Maxpm
    Maxpm over 9 years
    @Pacerier Dot files are files (or folders) whose names begin with a .. By convention, they're hidden by default on Unix-like systems.
  • vinod
    vinod over 8 years
    In case if i have deleted a folder using the command rm -rf **/generic how to print the path of the folder deleted
  • JB.
    JB. over 8 years
    @JonathanRoss I considered it as well initially, but considered the find way more idiomatic. But it's a valid enough alternative I'm considering editing it in to show the various nuances.
  • Braden Best
    Braden Best over 8 years
    It's actually easier if you hit Win+R to open the Run... dialog and then type the aforementioned %AppData%\.minecraft\bin.
  • Technoguyfication
    Technoguyfication about 5 years
    +1 for the tip about renaming the jar file. Had no idea it was just a zip all along.