LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problems installing J2SE on REDHAT 9.0 (https://www.linuxquestions.org/questions/linux-newbie-8/problems-installing-j2se-on-redhat-9-0-a-59844/)

sP1v 05-14-2003 07:50 PM

problems installing J2SE on REDHAT 9.0
 
Hi, I am relatively new to using Linux systems, I usually develop on Windows platforms but I now have a project that needs to developed on Linux so I’ve successfully installed RH v9.0 and now I am trying to get J2SE installed.

I downloaded the latest .bin distro from the SUN website and ran this from my home directory logged in as root. The files unpacked Ok but it seems like that is all that happened. My path environment variable has not had the java bin directory added to it, there is no CLASSPATH variable set and I cannot run jar files (the OS just seems to want to unpack them like zip files). I’m sure there a lot more configuration setting missing.

Is this normal? When I installed the same J2SE software for windows everything was setup and installed correctly with a single click.

I’ve looked though lots of the documentation from SUN and from what I understand all of my env var's and file association should have been setup, I was thinking of installing Redhat 7.3 and trying again, Is this worth doing or am I just missing something obvious.

In desperate need of some good advice

sP1v
:confused:

Tinkster 05-14-2003 09:41 PM

Well, I'm not using RH, but for all I know
sun doesn't do any of the modifications
needed for environment variables for
you (not for me, anyway ;}) ...

What you need to do is create a file
/etc/profile.d/jdk.sh

with the following contents (modify to
your needs)
Code:

#!/bin/sh
# Add JDK1.4 specific settings
# please note that your path's might be different! :}
export JAVA_HOME=/usr/java
export PATH=$PATH:/usr/java/bin:/usr/java/jre/bin
export CLASSPATH=$JAVA_HOME/lib

Then
chmod u=rwx /etc/profile.d/jdk.sh
chmod go+rx /etc/profile.d/jdk.sh

If the newer RH versions don't like your
Java you could still get the rpm and check
which settings it would modify using midnight
commander ... :)


HIH

Cheers,
Tink

sP1v 05-14-2003 09:59 PM

Maybe im just too used to designing idiot proof software distributions on Windows! At least I know where I stand now.

Thanks sP1v

Tinkster 05-14-2003 10:51 PM

No personal offense intended, but something
like the registry isn't idiot-proof, and anyone
who uses such thing should have his mind
checked :) ... I've seen so many unusable
winDOHs installations after a crashed registry -
I rather have the configuration in little, easily
administered chunks ;) that I can modify using
ssh over a 9.6KBit modem connection if need be.

Cheers,
Tink

sP1v 05-14-2003 11:26 PM

no offence taken, I was just surprised that the install binary or rpm couldnt have included a simple script to perform this task.

I found a simple guide on setting up the Java enviroment here:

http://members.shaw.ca/trollking/linux.html

for any others who encounter the same problem

Thanks again

sP1v

Tinkster 05-15-2003 07:03 PM

Quote:

I was just surprised that the install binary or rpm couldnt have included a simple script to perform this task.
It's simple, in theory... but if you hang around
in the linux world for a while you'll notice that
there's a bunch of different flavours, and all
do things slightly different ... therefore building
a universally valid installation script might
prove to be a really difficult task, and it would
be hard to maintain, too ;)

Cheers,
Tink


All times are GMT -5. The time now is 10:18 AM.