JavaContents

Differences between revisions 1 and 2
Revision 1 as of 2009-03-18 16:28:20
Size: 1542
Editor: lns-bzn-48f-81-56-218-246
Comment:
Revision 2 as of 2010-01-26 16:12:09
Size: 1574
Editor: c-98-245-82-231
Comment: note main universe, multiverse
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
To solve that issue I propose to create java-Contents.gz files that, for a given release, contains the mapping for all classes published in all packages in Ubuntu, under that format: To solve that issue I propose to create java-Contents.gz files that, for a given release, contains the mapping for all classes published in all packages in Ubuntu (main, universe and multiverse), under this format:

java-Contents.gz files

Why

It's quite difficult to tell which classes are defined in which jar, and in turn to which package this jar may belong.

To solve that issue I propose to create java-Contents.gz files that, for a given release, contains the mapping for all classes published in all packages in Ubuntu (main, universe and multiverse), under this format:

package component jar class

Where

You can download java-Contents.gz files from http://people.ubuntu.com/~ttx/java-Contents

How to use

You usually zgrep for what you want in the file. Examples:

Where is this class defined ?

To see where to find the javax.servlet.http.HttpServlet class, you can use:

$ zgrep -e ' javax.servlet.http.HttpServlet$' intrepid-java-Contents.gz
glassfish-javaee universe /usr/share/java/glassfish-javaee-2+b58g.jar javax.servlet.http.HttpServlet
glassfishv2 multiverse /usr/share/glassfishv2/lib/javaee.jar javax.servlet.http.HttpServlet
libservlet2.3-java main /usr/share/java/servlet-2.3.jar javax.servlet.http.HttpServlet
libservlet2.4-java main /usr/share/java/servlet-api-2.4.jar javax.servlet.http.HttpServlet
libservlet2.5-java main /usr/share/java/servlet-api-2.5.jar javax.servlet.http.HttpServlet
roxen4 universe /usr/share/roxen4/java/classes/servlet.jar javax.servlet.http.HttpServlet

How to recreate

The script used to create the java-Contents.gz file is currently available in a bzr branch at https://code.launchpad.net/~ttx/+junk/generate-java-Contents.

JavaTeam/JavaContents (last edited 2011-11-09 16:14:06 by james-page)