When searching for available packages, java-config only looks in the /usr/share directory. This is not desirable: some packages may be installed in /opt (e.g. J2EE) or in /usr/local/share. These cannot be added to the classpath... A workaround is provided on the Gentoo forums: http://forums.gentoo.org/viewtopic.php?t=56715. This is less than perfect as it involves fidgeting with the /usr/share directory. Reproducible: Always Steps to Reproduce:
Idea for how to fix this in java-config 1.1.5: generate a env.d entry and print it out.
Previous comment was bogus, sorry.<br> <br> Since ebuilds can install packages anywhere, adding /opt and /usr/share/local<br> will only be temporary fix, right?<br> <br> I'm guess I'm open to suggestions for how this can be fixed in a more <br> permanent way.<br>
Btw, I hate bugzilla.
AFAIK ebuilds can install java packages where ever they want. So how to decide where to look for packages is a problem. It should be a configurable option so it can change easily. Where to configure it is another problem. Some options for configuration are using a --option directive, an environment variable, and/or a configuration file. So far I think a configuration file is the best alternative, so the problem with cron breaking java-config can be avoided.
Ok, what about this: Each Portage-installed package installs a symlink in /usr/share/java/packages, that points to the package's environment file. This happens regardless of whether the actual package.env file is stuffed into /usr or /opt. Example: dev-java/ant-1.5.4-r1 would install the symlink named 'ant-1.5.4-r1' in /usr/share/java/packages, that pointed to /usr/share/ant/package.env Furthermore, java-config will also scan /usr/local/share/java/packages, so that user-installed packages will enjoy the same benefits without having to muck about in /usr. Note: it may happen that two packages have the same name, but live in different categories. In this case, the naming scheme adopted above with just the packagename-version-revision won't work; we should then append category_; example: dev-java_ant-1.5.4-r1, but this should be the exception rather than the rule, and it should be handled by the java eclass.
This has been implemented as per karltk's suggestions, all ebuilds need to do is utilize it -- fix is in 1.1.8 and 1.2.0 .
Version 1.1.8 is stable.