LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Installing Java (https://www.linuxquestions.org/questions/linux-software-2/installing-java-46025/)

tarballed 02-18-2003 02:46 PM

Installing Java
 
Hello everyone.
Well, I have a topic about Java and installing Java.
A little info:

I am installing IBM DB2 database on one of our servers to test. The installation went fine, however, I am having a hard time getting the GUI tool up and running. The GUI relies on Java.

The installation says it requires the IBM JRE 1.3. I went ahead and installed it from IBM.

However, when I try and execute the file to run the GUI, I get the following output:

./db2fs: line 14: db2javit: command not found

Obviously, I am missing something because it cannot find the db2javit.

Anyone have any idea on how I can figure this out?

Thanks everyone.

Tarballed

acid2000 02-18-2003 02:59 PM

Sounds like db2javit is not in your PATH?

tarballed 02-18-2003 03:06 PM

I started thinking about that a little bit after I posted.

My question is, I have both JRE 1.31 and 1.4 installed on the machine. I must admit, that I am new to Java.

How do I make sure that I can put db2javit goes into my path correctly? Can I search for the command?

Any help would be great.

THank you.

tarballed

cnjohnson 02-18-2003 04:32 PM

To see which JVM is in your path, get a command line and type

java -version

This will tell you what java version is in your path. To see your path, type

echo $PATH

Next, you modify your path to include the java version you want. This is will be set in your .bash_profile.

To change the PATH globally, so everyone finds the JVM you want, you'll have to edit /etc/profile.

HTH

Cheers--
Charles

tarballed 02-18-2003 04:40 PM

Thanks everyone for your help.
Here is some output from commands I executed:

[root@ubergeek opt]# java -fullversion
java full version "J2RE 1.4.0 IBM build cxia32140-20020917a"

[root@ubergeek opt]# java -version
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0)
Classic VM (build 1.4.0, J2RE 1.4.0 IBM build cxia32140-20020917a (JIT enabled: jitc))

[root@ubergeek opt]# echo $PATH
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/opt/IBMJava2-14/jre/bin:/root/bin
[root@ubergeek opt]#

From what I can tell, I have everything set correctly. But still, when I try and execute this file, to start the control center for the IBM DB2, I get the same error:

./db2cc: line 15: db2javit: command not found

Grrrrrrrrrrrr. Anyone have more suggestions? I feel like I am so close, but missing something very small.

Thanks.

Tarballed

cnjohnson 02-18-2003 05:26 PM

At a command line type

whereis db2javit

What is the output?

Cheers--
Charles

byfaithalone 10-14-2003 09:41 AM

I am very new to Linux. I am encountering the same issue as stated earlier in this thread. Here is the method I encounter:

db2inst2@AFLINUX2:~> db2cc
sh: line 1: /opt/IBMJava2-131/jre/bin/java: No such file or directory
DB2JAVIT : RC = 127

The path /opt/IBMJava2-131/jre/bin/java does not exist on my box. I am not sure where I need to include the IBM JAVA Path in my script. Also, I have gone into YAST and have uninstalled packages related to JAVA 1.4.1. Does this mean that all apps that require JAVA support will point to 1.3.1? How can I have both versions of JAVA installed on my linux box?

Here is an example of my etc/profile script:

#
# Make path more comfortable
#
if test -z "$PROFILEREAD" ; then
PATH=/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin
for dir in $HOME/bin/$CPU $HOME/bin ; do
test -d $dir && PATH=$dir:$PATH
done
test "$UID" = 0 && PATH=/sbin:/usr/sbin:/usr/local/sbin:$PATH
for dir in /var/lib/dosemu \
/usr/games \
/opt/bin \
/opt/gnome2/bin \
/opt/gnome/bin \
/opt/kde3/bin \
/opt/kde2/bin \
/opt/kde/bin \
/usr/openwin/bin \
/opt/cross/bin
do
test -d $dir && PATH=$PATH:$dir
done
unset dir
export PATH
fi

lmelliot 08-27-2004 09:23 PM

byfaithalone:

To use db2cc I had to update my JDK_PATH for db2 by entering:

db2 update dbm cfg using JDK_PATH /opt/IBMJava2-14


All times are GMT -5. The time now is 03:40 PM.