I've been unable to find a way to add sun-j2ee to the classpath using java-config. I don't know if this was an intentional design decision or if it was an oversight but I would think that the package sun-j2ee should be an available package for adding j2ee.jar to the classpth. After looking at the implementation for java-config I think it may be easier to modify the ebuild for sun-j2ee rather than modify java-config. I'll attatch a patch for the ebuild to this bug report.
Ok, I've tracked down what I think needs to be done to fix all of this. Currently, there is no setting for the j2ee stuff in the env.d folder, and java_config will not really work with adding j2ee.jar to the classpath because it's not installed in /usr/share/. I think the best option here is to add set_j2ee_env to java.eclass and add an env.d file for j2ee. I've created the file, but the ebuild for sun-j2ee and java.eclass both need to be modified. I'm just now getting a grasp of how to go about messing with this stuff and don't really feel comfortable messing in these files yet, but if it will help, I'll add some patches to implement these changes to this bug #.
Created attachment 25490 [details] the proposed env.d j2ee settings This is an example of what the env.d file should look like. I'll post the patch to the sun-j2ee.ebuild which should go about creating it in a few mins.
It is incorrect to add to the system wide classpath like that.
Comment on attachment 25490 [details] the proposed env.d j2ee settings ># Copyright 1999-2004 Gentoo Technologies, Inc. ># Distributed under the terms of the GNU General Public License v2 ># $Header: $ > >VERSION="SUN J2EE 1.3.1" >J2EE_HOME="/opt/sun-j2ee-1.3.1" >ADDPATH="${J2EE_HOME}/bin" >ENV_VARS="J2EE_HOME CLASSPATH ADDPATH" #just took out the classpath entry.
Nothing to add; just wanted to confirm the bug. I just emerged sun-j2ee and was very surprised to not see it accessible via java-config.
Someone either needs to tell me this is fixed or add my fixes into the portage/java systems because this has been sitting for a long time and afaik this fix will work that I posted. It works fine on my system anyhow. I'm a bit disappointed that nobody has used my work here yet...