JDK-5008584 : [JDS] environment variables for Java[TM] like JAVA_HOME are not set on the system
  • Type: Bug
  • Component: install
  • Sub-Component: install
  • Affected Version: tech_12,cinnabar
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic,linux_2.4
  • CPU: generic,x86
  • Submitted: 2004-03-05
  • Updated: 2005-05-17
  • Resolved: 2005-05-17
Related Reports
Duplicate :  
Description
The JDS includes the Java-realted RPMs

j2re
jmf-jre
j2re-integration

The files from these RPMs are loaded into a number of locations, including
/usr/java/j2re1.4.2_02

/usr/bin/java is set up by j2re-integration to point to 

../java/j2redefault/bin/java

/usr/java/j2redefault is itself set up by j2re-integration.

When the Sun linux j2sdk rpm (j2sdk-1_4_2_03-linux-i586.rpm) is installed, it is loaded into /usr/java/j2sdk1.4.2_03/

The file /etc/profile.d/alljava.sh is intended to set up the shell variables necessary to run a number of Java applications; such variables as JAVA_HOME, JAVA_ROOT, JAVA_BINDIR and JRE_HOME, as well as making entries in PATH. As distributed (before loading the 1.4.2_03 RPM from Sun), these varaibles are not set. A glance at the contents of alljava.sh shows why: it is looking in the wrong places. Loading the 1.4.2_03 RPM makes no difference, of course.

alljava.sh includes the comment
# send feedback to ###@###.###

To be of any use to developers, these variables need to be set, so alljava.sh (and alljava.csh) need to be modified to relate to the Sun distributions.

Comments
EVALUATION The Comments from SuSE indicate that the problem here is that Sun's Java does not conform to the FHS standard, and therefore the alljava.sh script that SuSE provide does not set the ENV VARs correctly for Sun'd Java, even though it works for IBM's, etc. Therefore, reassigning the bug to Java. This is certainly not a STOPPER issue for JDS 3, so I am adding the cinnabar-reviewed keyword also. ###@###.### 2005-04-27 14:38:42 GMT It is not possible for Java to support functionality that is unique to only one, or even a few distributions. SuSE uses alljava.sh. Red Hat uses alternatives, Debian uses something called alternatives, but it is not identical to what Red Hat is using. Geentoo is using something called config-java. The Java packages are required to be somewhat generic, so they work on lots of distributions. CR 6211006 is the Java teams generic answer to supporting a default Java on Linux. In the future the Java team should look into a way to make it possible for distribution builders to customize the Java RPM packages. ###@###.### 2005-05-17 01:34:21 GMT
27-04-2005