Results 1 to 2 of 2

Thread: How to open java files with java not archive manager?

  1. #1
    Join Date
    Sep 2013
    Beans
    46

    How to open java files with java not archive manager?

    How to do this?

    Tried all the answers here, nothing works:

    http://askubuntu.com/questions/19291...a-double-click

    problem is, i can only run a file with java by right clicking the file, and selecting java from the open with menu, i want it to double click open in java. with archive manager demoted to the open with menu.

  2. #2
    Join Date
    Dec 2007
    Location
    Gainesville, Florida
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: How to open java files with java not archive manager?

    I did this on xubuntu to make jar files run on a double click. You should be able to do something similar in other flavors of Ubuntu.

    1. run a terminal and type cd <name of directory where jar file is stored> then type chmod u+x <name of jar file>
    I had to do this in a terminal. the permissions in the file manager wouldn't let me change to executable. If yours does then add the executable bit there.

    2. right click on the jar file and choose to open/run with other application. choose the java jre you want to use.
    this sets the MIME type to always run with java.

    You may experience issues with this because some java programs need some runtime arguments to make them work correctly.

    EDIT: I should mention that this has to be done with every jar file. the executable bit is not set on jar files and will need to be set to run it.
    Last edited by pbrane; October 12th, 2013 at 11:25 PM.

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
  •