LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   JAVA SDK install on CentOS (https://www.linuxquestions.org/questions/linux-newbie-8/java-sdk-install-on-centos-447935/)

CY83R-R0N1N 05-23-2006 10:28 PM

JAVA SDK install on CentOS
 
Hi guys, got a bit of a prob you guys most probably will be able to help me with.

Im trying to set up a Compiere CRM with the Oracle 10g Database at the moment.

I successfully installed Oracle no probs (I think) and when I try to run the compiere installer (RUN_setup.sh) it comes back asking me to set the JAVA_HOME variable.

I have found tutorials for this but all explain how to install JAVA SDK, but not how to set up the variables.

Ok, I installed the j2sdk-1_4.2_11-linux-i586.bin file into my /usr/java folder. That seemed to go OK. Now Compiere says that I need to install the SDK as well as the Runtime. I "yum install java" to et the runtime.

Now how on earth do I set up the variables such as "JAVA_HOME, CLASSPATH, and PATH"? I thought I had to edit the /etc/profile file but once I did that I couldnt boot into Gnome.

If someone could walk me through it I would be very gratefull.

Also, do I need to install j2ee (Enterprise Ed) as well as the standard SDK? If so, once again, how?

Oh, and for those that might not know, CentOS is a free Redhat Enterprise 4 Clone, so all you Redhat guru's out there should know a solution :)

CY83R-R0N1N 05-24-2006 01:16 AM

Ok, I did find these three commands that set the home when entered into the xterminal

export JAVA_HOME=/usr/java/j2sdk1.4.2_11
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=$CLASSPATH:

But the second I reboot the server it goes back to its default.

reddazz 05-24-2006 05:53 AM

When I install java, I create a script in /etc/profile.d called sunjdk.sh, make it executable and put the following
Code:

#!/bin/sh
export JAVA_HOME=/opt/java
export MANPATH=$MANPATH:/opt/java/man
export PATH=$PATH:/opt/java/bin:/opt/java/jre/bin

That sets JAVA_HOME and java paths for all users. You may need to do "source /etc/profile" or logout and back in again to get the paths working right. Change the paths so that they are the same as those on your system.

CY83R-R0N1N 05-24-2006 11:17 PM

Thanks for the reply. mmkay, I think I know what your talking about lol.


All times are GMT -5. The time now is 11:05 PM.