Visit Our UNIX and Linux User Community


Setting link to newly installed Java version


 
Thread Tools Search this Thread
Operating Systems Solaris Setting link to newly installed Java version
# 1  
Old 05-27-2008
Setting link to newly installed Java version

Hi,
I have Solaris 8 wih Java 1.2.2 as default. I just upgraded it to Java 2 version 1.4. But when I do "java -version: I get following:

"Java version "1.2.2"
Solaris VM (build Solaris_JDK_1.2.2_05a, native threads, sunjwit)

How would I make solaris to look at my new java?

If I have to do the link then please tell me how to do that and if I have to set the PATH then tell me how to do that too...

Help is very much appreciated.

Thanks in advance!!
# 2  
Old 05-28-2008
just u downlod pkg or patch from sunsolve.sun.com
add packages with pkgadd
and patches with patchadd <p.id>

second is the best option for update the any version in solaris..
best of luck.just u try it..
Smilie
# 3  
Old 05-28-2008
Yes, Thank you for the advice I used the pkgadd tool to upgrade the java version. The command "java -version" is still displaying the older version of java.

Is there a way I can reset the link "/usr/bin/java" to look at the new install directory "/usr/j2se/java"?
or
How would I set .cshrc to include "/usr/j2se/bin" in PATH as .cshrc is in "Read-only" file?

Which is the correct method from above?

If I do /usr/j2se/bin/java -fullversion" then it displays the correct version but I need "java -version" to display what I see when I type "java -version"

I am totally LOST here in solaris...

Thanks in advance for your help and advice!!!
# 4  
Old 05-28-2008
type which java to get the current location of the link, remove the link with rm then recreate the link pointing to the new version.

#which java
/usr/bin/java
#ls -ld /usr/bin/java
lrwxrwxrwx 1 root other 16 Apr 8 12:41 /usr/bin/java -> ../java/bin/java
#rm /usr/bin/java
#ln -s /usr/bin/j2re1.4.2_17/bin/java /usr/bin/java
#ls -ld /usr/bin/java
lrwxrwxrwx 1 root other 30 May 28 15:30 /usr/bin/java -> /usr/bin/j2re1.4.2_17/bin/java
# 5  
Old 05-28-2008
mr_crosby-----> U r the MAN!!!

It worked and now I am very greatfull that I ended up in the right place to solve my problem.

YOU guys ROCK!!!

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Bash find version of an installed application but if none is found set variable to App Not Installed

Hello Forum, I'm issuing a one line bash command to look for the version of an installed application and saving the result to a variable like so: APP=application --version But if the application is not installed I want to return to my variable that the Application is not installed. So I'm... (2 Replies)
Discussion started by: greavette
2 Replies

2. HP-UX

Setting up new version of java

Hi, I have got jre 1.5 that I have got to install in the HP.UX version 11.31. I managed to install it with this command : # swinstall -s /tmp/<jre.XXXXX.depot> It automatically gets created in /opt/java1.5/jre/bin. However, now I am not sure how to set the PATH to JAVA_HOME, and path to... (1 Reply)
Discussion started by: anaigini45
1 Replies

3. Solaris

Could not logon to newly installed Solaris 11.2

Dear Solaris 11 experts, I can not logon to a newly installed Solaris 5.11 11.2 i86pc i386 i86pc just downloaded today, despite having entered username and password to be created. However, I cannot get on to this workstation after Solaris installation completion. Can you advice how to reset my... (5 Replies)
Discussion started by: gjackson123
5 Replies

4. Shell Programming and Scripting

Setting java and returning version

I am currently trying to write a script and I am not that great at wording it with taking in user input, it will do the following: ask " Have you stopped instances? " if instances are stopped, then I want it to change to the default java to 64 bits, and print the current version of java.... (1 Reply)
Discussion started by: bigbenn
1 Replies

5. Shell Programming and Scripting

installed java version ?

Hi, I want to know what version of the java is installed? Please let me know the command or process to identify the installed java version in sun solaris box. Thanks in advance for all your support. (3 Replies)
Discussion started by: sridhardwh
3 Replies

6. UNIX for Advanced & Expert Users

Advanced Search * View * Edit JAVA version to WORK in GLASSFISH Forum topic JAVA version

Would like to confirm the ff. I got confused actually with the version I needed to download that will work on glassfish 3.0.1 a. Debian Squeeze (HP DL360). Need to use java version6 On Debian, I did apt-get install sun-java6-jdk. So when I check it's java version "1.6.0_22" Java(TM) SE... (1 Reply)
Discussion started by: lhareigh890
1 Replies

7. Shell Programming and Scripting

Which version of perl is installed on my system?

Hi, With the command perl -v i can see the perl version, but it's like a text file.. is there a command which could give me just the perl version number? i.e.: "5.8.1" thanks!! (6 Replies)
Discussion started by: kfad
6 Replies

8. UNIX for Advanced & Expert Users

How to Find the OS version Installed

Hi, I wanted to know how can I get the version of underlying HP-OS installed on a HPUX workstation. The output required is "June 2001" version or "March 2003" version etc whatever OS is present. Thanx in advance for your help. Regards, Pankaj (3 Replies)
Discussion started by: pankschawla
3 Replies

Featured Tech Videos