| Fix Java Errors With ConsoleOne On Linux
Posted: 21 Apr 2005
Running ConsoleOne on Linux can be a small adventure. With multiple runtime
environments to choose from and different implementations in the distributions,
getting ConsoleOne up and happy requires a little understanding.
In order to run, ConsoleOne needs to be able to find a proper Java Runtime
Environment. When trying to get ConsoleOne up and running, verify first the JRE,
then make sure ConsoleOne can find it.
Verify A Working JRE Is Installed
The question of ensuring a proper JRE is installed is fairly complex. The
main options for the JRE are IBM Java, Sun Java, and Novell's JRE that is
included in the ConsoleOne package.
The easiest way to give recommendations is by distribution and product, so
- SUSE LINUX 8, including SLES8 You can use the IBM Java package that
comes with the system. Due to variances in updates; however, the best practice
is to allow the ConsoleOne install to install the Novell JRE, which works well
with the 2.4 kernel.
- SLES9 Never use the IBM Java package 1.4.2 included in SLES9. Also
do not allow ConsoleOne to install the Novell JRE package. The best bet is to
install the Sun JRE, which is included in the SLES9 distribution.
- NLD, SUSE LINUX Professional 9.2, 9.3, OES These distributions
install and use the Sun JRE by default, so they'll work without an additional
- Novell Linux Small Business 9 The ConsoleOne package included in
NLSB9 has an updated Novell JRE, so allow ConsoleOne to install the Novell JRE
during the install. Note that the Novell JRE on NLSB9 can be installed on any
2.6 kernel and work. The package novell-c1-sdd is installed by default and
sets up LSB to deliver ConsoleOne to client systems from the directory
- RedHat, other distributions Users have confirmed ConsoleOne running
on the Sun JRE on RedHat and other distributions. The Sun JRE can be
downloaded at http://www.java.com/en/download/linux_manual.jsp
The easiest way to make sure the JRE is installed and working right is to use
YaST to search for java or jre.
Make Sure ConsoleOne Can Find The Correct JRE
The script that starts ConsoleOne is located at
/usr/ConsoleOne/bin/ConsoleOne. Looking in the script reveals code that tries to
find the JRE to use. The code is also set up to give precedence to certain
locations. The priority is as follows (from highest to lowest):
- C1_JRE_HOME an environmental variable
- /usr/ConsoleOne/jre/jre to account for the Novell JRE being installed
- /usr/ConsoleOne/jre the default location for the Novell JRE that is
installed by ConsoleOne
- JRE_HOME the standard JRE environmental variable
Note: You can also enable code in the ConsoleOne script to use Compaq Java
and IBM Java.
You should verify that ConsoleOne can find the correct JRE on your machine.
The first step to take is to see what the environmental variable JRE_HOME is set
to. Do the following:#echo $JRE_HOME /usr/lib/java/jre
On many systems using the IBM Java package, JRE_HOME is set to /usr/lib/java.
The example listed above is taken on a Linux Small Business 9 system.
The next step is to find if the path in JRE_HOME points to a linked file, and
if so to find out what java package it is linked to. For example:#ll
/usr/lib/java lrwxrwxrwx 1 root root 12 2005-04-13 03:59 /usr/lib/java ->
The output indicates that the default JRE on the system is IBM Java. In this
case, IBM Java 2-1.4, ConsoleOne doesn't work with the default JRE. If the
default JRE is the desired JRE for your system, nothing further is required.
If ConsoleOne doesn't work with the default JRE, you'll need to point it to
an alternate JRE. The two most common possibilities are as follows:
If the system can correctly use the Novell JRE (2.4 kernels and Linux Small
Business 9), then installing the Novell JRE during the ConsoleOne install is all
that is required. The Novell JRE will be installed in /usr/ConsoleOne/jre and
take precedence over the default JRE listed in JRE_HOME. The only problem that
could arise is having C1_JRE_HOME defined in the environment, but this is
unlikely as the user must explicity create and define C1_JRE_HOME.
On many of the newer SUSE LINUX distributions, Sun JRE is the default JRE
pointed to by JRE_HOME. If you're going to use Sun JRE on systems that don't
have it as the default JRE, you need to set up ConsoleOne to find the Sun JRE
folder on the system.
The first step is to find where the Sun Java package is installed on your
system. Specifically, look for the jre folder. On SLES9, the Sun Java package
installed by YaST will place a link to the Sun Java files at /usr/lib/SunJava2.
With the Java package from http://www.java.com/ on a RedHat box, the JRE is found at
/usr/java/jre1.5.0_02. The jre folder is always in the package name folder (e.g.
With the path to jre folder, you're now need to provide the path to
ConsoleOne using the C1_JRE_HOME environment variable. Do the following:
- Open a terminal and sux to root
- Change to the ConsoleOne bin directory by entering cd
- Allow root to write to the ConsoleOne script by entering chmod 755
- Open ConsoleOne for editing by entering vi ConsoleOne.
- Under the line export the LD_LIBRARY_PATH environment variable add the
line export C1_JRE_HOME=path_to_the_Sun_JRE. For example, export
- Save and close the file.
- Test the change by launching ConsoleOne by entering ./ConsoleOne.