Results 1 to 4 of 4

Thread: .jar and .zip Archives are Confused

  1. #1
    Join Date
    May 2008
    Beans
    1,029

    Question .jar and .zip Archives are Confused

    My Lubuntu desktop has got .jar and .zip archives confused. They both appear as ZIP Archive to the system. I have been through /etc/xdg/lubuntu/applications/defaults.list and /etc/gnome/defaults.list and have set up application/x-java-archive, application/x-java, and application/java-archive to open with my java.desktop file. I have also been through the /usr/share/mime directory. Everything seems fine there. But still anytime I change the default application for either .jar or .zip files, it also changes it for the other. Any ideas how these two mime-types are affecting each other?

  2. #2
    Join Date
    Oct 2009
    Location
    Elgin, IL USA
    Beans
    2,712
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: .jar and .zip Archives are Confused

    I think .jar files are .zip files, just with java content. For example if you download .jar files in Internet Explorer it uses its own convoluted method to determine file type and incorrectly saves them with .zip filename extension.

    But the only .jar files I run need parameters, so I never run them by double click, I either put scripts in my ~/bin to launch them or something like this in a desktop launcher:
    Code:
    sh -c 'java -Xmx2G -Xms1G -cp ~/MC-client/minecraft.jar net.minecraft.LauncherFrame'
    i5 650 3.2 GHz, 8 GB, nvidia GTX 750 Ti, 32" 1080p | i7-4700MQ, 8 GB, Intel HD 4600/nvidia GTX 765M, 15.6" 1080p | etc.

  3. #3
    Join Date
    Jul 2010
    Location
    New Jersey
    Beans
    167
    Distro
    Lubuntu

    Re: .jar and .zip Archives are Confused

    Did you just update your Java like me? Because it just did the same thing for me as well after updating my Java.

    Anyway a quick work around for this is to right click on .jar file and click "Open With", go to the "Custom Command Line" tab, and put in

    Code:
     cautious-launcher %f /usr/bin/java -jar
    Set it as the default action and it should open all .jar files correctly then.

  4. #4
    Join Date
    May 2008
    Beans
    1,029

    Re: .jar and .zip Archives are Confused

    I got it fixed, but it was a week or so ago and I'm not sure if I remember how I did it. I was screwing around with the mimetypes files. I think I created a new mimetype for .jar files. I think your workaround would have worked too Gaygerbil, thanks.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •