The sun-j2ee ebuild needs to add /opt/sun-j2ee-*/lib/j2ee.jar to the CLASSPATH and set the variable J2EE_HOME to /opt/sun-j2ee-* to be used correctly in java devolopment. I believe these variables are separate from whichever vm one is using.
*** This bug has been marked as a duplicate of 10793 ***
This isn't a dup. The sun-j2ee ebuild is separate from sun-jdk. It also doesn't currently do anything to set the environment to anything.
i marked it as a dup because the sun-* have messed up environments currently
The description of the other bug doesn't describe the same problem as this one. Fixing that one also wouldn't fix the problem with sun-j2ee. An extra variable actually needs to be added and new data needs to be appended to CLASSPATH that isn't already there.
I too will vouch to have this bug fixed. I'm very impressed with Gentoo's committment to Java -- tools like java-config and the automatic setting of environment variables in /etc/profile.env is really great. Adding the following for sun-j2ee would be even better! - J2EE_HOME - j2ee.jar to CLASSPATH - $J2EE_HOME/bin to $PATH Is there any way I could help here? Perhaps I will try playing with the ebuild scripts and see what happens... Thanks! --Stuart
Created attachment 12469 [details, diff] adds a file to /etc/env.d/ for the sun-j2ee-1.3.1 I looked into modifying java-config, and this seems to be the most compatible way to add the J2EE classpath and path to the environment. J2EE_HOME can also be added if necessary. Regards, Brian
Created attachment 12470 [details] adds a file to /etc/env.d/ for the sun-j2ee-1.3.1 I looked into modifying java-config, and this seems to be the most compatible way to add the J2EE classpath and path to the environment. J2EE_HOME can also be added if necessary. Regards, Brian
Created attachment 25515 [details, diff] New diff for 1.3.1-r1 includes J2EE_HOME
I made another patch, as you can see, for r1, but it gives sandbox violations. Perhaps java-config is the way to go after all. Anyway, this bug has been on the books for too long (last edited *last may???*) ;-)
Created attachment 25541 [details, diff] This patch for the sun-j2ee-1.3.1-r1.ebuild should fix the environment variables *without* sandbox violations ;-) My apologies, I should have tested the previous patch. This one executes without sandbox violations, hope it helps!
Thanks, in portage now guys ;)