Announcement

Collapse
No announcement yet.

.jar file association

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    .jar file association

    Kubuntu 12.04 amd64 on HP dv4

    After installing astah-community modelling tool I cannot run .jar apps because they're associated with Astah. Inspecting the File Associations in System Settings I see that .jar is associated only with Java Runtime, but this is not being respected by Dolphin's context menu or double-clicking a .jar file. Is it possible to manually remove this association and revert it only to Java Runtime?

    TIA

    #2
    To run .jar apps I usually make a short cut using "java -jar" then the path to the application to run it. I find this the easy way to do it.
    Alienware 17 R2
    ​ 8 × Intel® Core™ i7-4720HQ CPU @ 2.60GHz
    ​ with Kubuntu 23.10
    Nvidia Graphics
    16 Ram
    Close Windows and open the world!!

    Comment


      #3
      I open .jar file (gtd-free-0.6-beta.jar) with right click Open with OpenJDK Java 7 Runtime. And it works. Make sure that your Java and this particular program file is ok. Did you check with other java programs?

      Comment


        #4
        Originally posted by gnomek View Post
        I open .jar file (gtd-free-0.6-beta.jar) with right click Open with OpenJDK Java 7 Runtime. And it works. Make sure that your Java and this particular program file is ok. Did you check with other java programs?
        I use the Oracle/Sun JDK 7. Please note in the attached screenshots that .jar files are associated with Java Runtime (and Ark), but Dolphin shows them of "astah* document" type. How do I remove this association and revert it back to Java Runtime?
        Attached Files

        Comment


          #5
          When you right-click the .jar file and open the sub-menu "Open with...", what actions are available?

          ... And, if you go to Properties (also in Dolphin), and click the wrench icon to the right of "Type:" what applications are listed there?
          Last edited by SecretCode; Aug 30, 2012, 09:17 AM.
          I'd rather be locked out than locked in.

          Comment


            #6
            Originally posted by mmnogueira View Post
            Dolphin shows them of "astah* document" type. How do I remove this association and revert it back to Java Runtime?
            I am not sure why Dolphin has this bad entry. Try removing this entry in settings and add a new one or edit it and point to your java*.desktop in /usr/share/applications (in add option you select an aplication name). In my edit → general I have this path to openjdk-7-java.desktop file.
            In application preference (for x-java-archive, filename patterns *.jar, OpenJDK Java 7 Runtime), edit → application → command I have:
            Code:
            cautious-launcher %f /usr/bin/java -jar
            http://i.imgur.com/zIXQj.png
            http://i.imgur.com/XqHk6.png
            http://i.imgur.com/yHck3.png
            Attached Files

            Comment


              #7
              Originally posted by SecretCode View Post
              When you right-click the .jar file and open the sub-menu "Open with...", what actions are available?
              "Open with astah* community" (see attached screenshot).

              ... And, if you go to Properties (also in Dolphin), and click the wrench icon to the right of "Type:" what applications are listed there?
              Only "astah* community". Curious that the Filename Pattern is "*.asta", despite the file being a .jar (see attached screenshot).

              I removed this association but don't know how to create a new one with Java, since it's already set in System Settings.

              Thanks for you interest.
              Attached Files

              Comment


                #8
                Originally posted by mmnogueira View Post
                I removed this association but don't know how to create a new one with Java, since it's already set in System Settings.
                In settings "configure file associations" I have only one entry for java files: in "application" section of files there is entry: x-java-archive with details that I already mentioned. There is add button below Known types pane on the left. So use it and add an entry with and as Type name use x-java-archive.
                If you have any other entries for java delete them or edit to make sure that they point to java*.desktop and have command that I gave. This should work.

                Comment


                  #9
                  Originally posted by gnomek View Post
                  In settings "configure file associations" I have only one entry for java files: in "application" section of files there is entry: x-java-archive with details that I already mentioned. There is add button below Known types pane on the left. So use it and add an entry with and as Type name use x-java-archive.
                  If you have any other entries for java delete them or edit to make sure that they point to java*.desktop and have command that I gave. This should work.
                  I'll do it. Inspecting more carefully other directories and files in Dolphin, I noticed that many extensions are wrongly associated with astah-community. What a mess!

                  Thanks a lot for your help.

                  Comment


                    #10
                    When you right click on the .jar file and choose "open with" then choose Other... you can choose the program to open it with and check the box "remember application association for this type of file.
                    Alienware 17 R2
                    ​ 8 × Intel® Core™ i7-4720HQ CPU @ 2.60GHz
                    ​ with Kubuntu 23.10
                    Nvidia Graphics
                    16 Ram
                    Close Windows and open the world!!

                    Comment


                      #11
                      Originally posted by eddieg538 View Post
                      When you right click on the .jar file and choose "open with" then choose Other... you can choose the program to open it with and check the box "remember application association for this type of file.
                      Combining your instruction with gnomek's above solved this issue - thanks a lot to all. However, some intriguing inconsistencies remain: it seems to me that Dolphin and File Associations of System Settings store this information in different locations. Please refer to the attached screenshots to understand what I mean (BTW, I removed this .jar association in Dolphin and now I cannot edit it anymore...).

                      Thanks again.
                      Attached Files

                      Comment

                      Working...
                      X