@zerwas: A .jar file can only be opened with the JRE if it's an executable Jar file, i.e. if it has a Main-Class specification in its manifest. If the Jar file doesn't have a main class specification, it should be opened with the archive manager because it is not an executable jar file. Opening a non-executable jar file using the JRE would mean that as far as the user is concerned, nothing would happen as the JRE would exit immediately. In terms of usability, this is actually worse than opening all jar files with the archive manager.
@Pedro: I believe zerwas means that when a .jar file is double clicked, rather than being opened with the archive manager, it should be run using the following command: java -jar /path/to/jar/file This actually executes the Jar file, if and only if it contains a META-INF/MANIFEST.MF file that itself contains a line starting Main-Class: as explained here: http://www.cs.princeton.edu/introcs/85application/jar/jar.html Having said this, I have reservation about being able to do run executable jar files like this because it would mean that you could run third party code contained in a jar file by just double clicking on it, irrespective of whether the execute bit is set or not. In order not to compromise security when doing this, you would need to run the JRE with a restrictive security policy. Another alternative would be to treat executable Jar files in a similar way to .deb files: open a dedicated Java package installer that registers the Jar file as an application. -- .jar file should open with JRE instead of archive manager https://bugs.launchpad.net/bugs/607712 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
