cancel
Showing results for 
Search instead for 
Did you mean: 

Java on SOLARIS

Former Member
0 Kudos

Hi,

I want to install SAP on solaris. I´ve installed de j2sdk 1.4.2_23 and declare it the Environment variable JAVA_HOME to this directory but I do java -version I get this

root@host # java -version

java version "1.5.0_21"

Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_21-b01)

Java HotSpot(TM) Server VM (build 1.5.0_21-b01, mixed mode)

What can i do?

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member906139
Active Participant
0 Kudos

Hello Ruben,

The problem is in PATH env variable.

The java home you have set is correct, but in PATH env variable, path upto jdk 1.5 bin dir is specified before $JAVA_HOME$/bin.

So please make change and add jdk 1.4 bin dir in first position in PATH env variable.

This will solve your problem.

Regards,

Abhay

Former Member
0 Kudos

Hi

Where shell I´ve to declare the E.V PATH? What have to show me the echo $PATH? only the path of the java?

Where can found the file .cshrc for edit the E.V PATH?

More thanks

Edited by: Ruben Torres on Dec 24, 2009 10:18 AM

former_member906139
Active Participant
0 Kudos

Hello,

You need to check env variable PATH for user root only as you will be running installation via root.

Now after login with user root, you can give below command to check for PATH env/

  1. env | grep PATH

add your jdk 1.4 path as follows.

  1. setenv PATH /<jdk1.4 path>/bin:$

(setenv command depend on shell on which u are working)

Above command will temporaly add jdk1.4 path so that u can continue with your work.

You can check java version now for confirmation.

If you logged off and login again now, the new value will be removed and again if you check for java version it will show jdk 1.5.

Setting entry in .csh file means permenantly changing env variable, which is not required in your case.

Regards,

Abhay

Former Member
0 Kudos

Hello Ruben,

Please do echo $JAVA_HOME and double check.

Also please check if there are two directories under /opt:

java1.4 and java.1.5

Regards.

Ruchit.

Former Member
0 Kudos

Thanks for your answer,

In the E.V JAVA_HOME is declared this

root@host # echo $JAVA_HOME

/usr/jdk/j2sdk1.4.2_19

Under /opt there are not any directories wit 1.4.2 and 1.5.0, but in the directory /usr/jdk/ , yes. there are 2 directories.

JPReyes
Active Contributor
0 Kudos

You can have 2 versions of java without issues as long as the one you need is set with the env varibles...

Regards

Juan

Former Member
0 Kudos

Hello Ruben,

java -version would show the higher version of java however the installation would go with environmental variable value which is 1.4.2 in your case. That is the one you should use. Would not be an issue. I agree with Juan and can also say based on experience.

Anyways when you are using java -version which directory are you in ?

Regards.

Ruchit Khushu.

Former Member
0 Kudos

I just installed the j2sdk 1.4.2_23 on solaris x64 and when i have to put the path on the sapinst I put the path /usr/jdk/j2sdk1.4.2_23 and It´s erroneous. If i put the path of usr/java sometimes is correct.

JPReyes
Active Contributor
0 Kudos

whats under /usr/java?

Regards

Juan

Former Member
0 Kudos

Hi Ruben,

Just checked JAVA installation notes for Solaris.Apparently /usr/java is the default location. In case you already haven't just check this link to verify if the JAVA installation has been done properly:

[JAVA on Solaris|http://java.sun.com/j2se/1.4.2/install-solaris.html]

Regards.

Ruchit.

Former Member
0 Kudos

If my solaris is an x86_64 what version of java I should keep?

Former Member
0 Kudos

The directory /usr/java is pointing to j2sdk 1.5.0. I declared the environment variables JAVA_HOME and SAPINST_JRE_HOME and always get the error.

When i execute the ./sapinst I get this :

/sapinst2/sapinst_exe.14521.1261595928/jre/bin/java* -Xmx256M -Dsap.env.var.javahome=SAPINST_JRE_HOME -cp /sapinst2/sapinst_exe.14521.1261595928/JAR/instgui.jar SDTServer rootdir=//.sdtgui config=jar:sdtserver.xml guiport=21212 httpport=4239 -nolock -srvarg=/SAPinstService/host=localhost -srvarg=/SAPinstService/port=21200 guistart=off

I push the path of java and get this message

Directory /usr/j2sdk1.4.2_23 is not a valid JDK directory: the java executable is missing.

I saw in this directory that are file missings.

Former Member
0 Kudos

Hello Ruben,

Just try declaring JAVA_HOME and not SAPINST_JRE_HOME and see if that works.

Also are installing ABAP alone or is JAVA stack also involved.

Also what are the sub directories under /usr/j2sdk1.4.2_23.

Regards.

Ruchit.