jdk installation - update environment?


 
Thread Tools Search this Thread
Operating Systems Solaris jdk installation - update environment?
# 1  
Old 10-25-2010
jdk installation - update environment?

Hi,

i have installed jdk 1.6 successfully but when i issue command

Code:
 
java -version

it shows me old version how to handle it.

kindly help
# 2  
Old 10-25-2010
Is it the one which you are trying to see is install with the operating system and not the open which you have install.
# 3  
Old 10-25-2010
Quote:
Originally Posted by malikshahid85
Hi,

i have installed jdk 1.6 successfully but when i issue command

Code:
 
java -version

it shows me old version how to handle it.

kindly help
Sounds like a simple PATH issue.

Update your PATH environmental variables in your profile and you should be OK.
# 4  
Old 10-25-2010
Hi,
Code:
bash-3.00# which java
/usr/bin/java

bash-3.00# ls -al /usr/bin/java
lrwxrwxrwx   1 root     other         16 May 14 15:32 /usr/bin/java -> ../java/bin/java

Look at the /usr/java link and change it to the new version:
Code:
lrwxrwxrwx   1 root     other         15 May 14 15:39 java -> jdk/jdk1.5.0_22

/usr/java/jdk/latest should already be pointing to the latest version if your install went fine.

That's what we always do when moving to a different java. Also, the back-out is really faster.

Hope it helps Smilie
# 5  
Old 10-25-2010
Quote:
Originally Posted by plmachiavel
Hi,
Code:
bash-3.00# which java
/usr/bin/java

bash-3.00# ls -al /usr/bin/java
lrwxrwxrwx   1 root     other         16 May 14 15:32 /usr/bin/java -> ../java/bin/java

Look at the /usr/java link and change it to the new version:
Code:
lrwxrwxrwx   1 root     other         15 May 14 15:39 java -> jdk/jdk1.5.0_22

/usr/java/jdk/latest should already be pointing to the latest version if your install went fine.

That's what we always do when moving to a different java. Also, the back-out is really faster.

Hope it helps Smilie
Don't do this. It is the wrong way to access the current version of java. There are known performance problem in JDS and some other standard applications when you do this. The system-wide default should be left the way it is and as neo said the PATH should be updated as required, or the full path used.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Installation of virt-manager while yum update and yum install rhvm does not work

I have downloaded RHEV-H 4.2 Red Hat Virtualization - Red Hat Customer Portal (RHVirtualization 4.2 Host and Manager iso). I uploaded the image and installed on an HP G9 server baremetal. I found I dont have a WAN/net connectivity later on HPG9 server. How can I still install virt-manager on... (1 Reply)
Discussion started by: Paras Pandey
1 Replies

2. Solaris

JDK installation. An awesome challenge.

Hello guys, I've tried to install more recent version of JDK (1.8.0_161), SVR4 package. Everything went succesfully except one thing. The OS persistenly refuses to recognize newest java version. :( There should be 1.8.0_161 instead. I've done everything that is described for SVR4 packages,... (2 Replies)
Discussion started by: wolfgang
2 Replies

3. AIX

Pre-installation verification before technology level update

Hello, I was trying to upgrade TL on a lab server (test box). I did worked on (few) these type of SP and TL updates in the recent past. I saw the below message for the first time on server. current OS level : 7100-03-01-1341 downloaded the newest/recent fix pack from fix central as... (3 Replies)
Discussion started by: system.engineer
3 Replies

4. Proxy Server

Installation JDK in the LXC container - Host behind Proxy

Hello, The host on which i work is a remote machine behind a proxy. I have installed the jdk like that and it works well: (I access the remote machine via ssh) http_proxy=http://proxy:3128 && https_proxy=http://proxy:3128 sudo apt-get install openjdk-7-jre-headless :~# java... (1 Reply)
Discussion started by: chercheur111
1 Replies

5. Solaris

Solaris Operating Environment Installation CD, aka "CD0" PN: 704-7076-10

Hi to all. It is need to install Solaris 2.5.1 on Sun Enterprise 220r and 420r. Share somebody Solaris Operating Environment Installation CD, aka "CD0" PN: 704-7076-10 ... It is very necessary! ! ! PM or ftp link.... :D (4 Replies)
Discussion started by: aivengoff
4 Replies

6. Red Hat

Apache,php,mysql, and jdk 1.6 update 20 installation on RHEL 5.5

I want to install Apache (version 2.2.X), php (version 5.3.X),mysql (version 5.5.X) on RHEL 5.5. Guide re. site address for download all rpm. X = latest version. Thanks in advance. (1 Reply)
Discussion started by: vasdaax
1 Replies

7. Solaris

Solaris SPARC 10 64Bit -JDK Installation 1.6.05

In Sun Solaris 10, not able to create the key. JDK 1.6 Installed & PATH & JAVA_HOME both are referred to jdk 1.6. It is showing the belwo error Error: wrap() failed java.security.InvalidKeyException: wrap() failed at sun.security.pkcs11.P11RSACipher.engineWrap(P11RSACipher.java:395) at... (10 Replies)
Discussion started by: saktiviji
10 Replies

8. Solaris

Update single zone in alternate boot environment.

I 'm having a weired situation my system has 8 zones, running fine on solaris x86_u4. I installed the live upgrade bundle patch and did a live upgrade. The new BE was created but it missed one of the zone and now if i mount the new BE i do not see that zone in the environment so my question is how... (3 Replies)
Discussion started by: fugitive
3 Replies

9. Red Hat

jdk installation question

hi, i just "yum install jdk*.i386" and installation was complete without any error. however, i tried to #javac helloworld " and javac is not found in the $PATH. i tried to locate it and didn't find it. would anyone shed some light on where the "yum install" installed my jdk to? where can i find... (0 Replies)
Discussion started by: k2k
0 Replies

10. UNIX for Dummies Questions & Answers

JDK Installation

I'm trying to install JDK (Java Development tools) and i get this: WARNING: The <SUNWj6dev> package "JDK 6.0 Dev. Tools (1.6.0)" is a prerequisite package and should be installed. WARNING: The <SUNWj6rtx> package "JDK 6.0 64-bit Runtime Env. (1.6.0)" is a prerequisite package and should be... (0 Replies)
Discussion started by: idan_cn
0 Replies
Login or Register to Ask a Question