[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Problem with the Debian policy for Java



The Java extension mechanism (see
http://docs.oracle.com/javase/tutorial/ext/basics/install.html )
requires that jar files containing libraries, not applications,
be installed in a standard directory.  For Linux, this directory
is /usr/java/packages/lib/ext - this directory is the default
one used by the java command, as can be seen by running the
following program:

        public class PrintExtDir {
           public static void main(String argv[]) {
               System.out.println(System.getProperty("java.ext.dirs"));
           }
        }

Class libraries in this directory are not named as part of the class
path.  In addition, these libraries get a default set of permissions
(typically all permissions).

If one installs such a library in /usr/share/java with a symbolic
link to it in /usr/java/packages/lib/ext, the permissions will 
not be granted, defeating one of the reasons for making a class
library a java extension. Granting permissions is based in part on
a "codebase", which includes a library's location after symbolic
links are resolved. In addition the same code could be handled by
two separate class loaders.

The problem is that extensions are really java libraries but the
Debian policy for libraries does not cover them as it does not allow
the libraries to be installed in the correct location.  Either that
policy needs to be modified or a new section dealing with extensions
needs to be added.

Regards,

Bill



Reply to: