path for jdk

I want to change path for java, (I have RH 6)
now another java i exe when "which jav" is run, but I want to change it to jdk,
how do I write a script for this. and in which
file do I do it.
(I have tried several lightly modified in different files but non seams to do the trick)

/k
k061198Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
ReinierConnect With a Mentor Commented:
In general the order of directories in your PATH environment variable ("echo $PATH" to view it) determines which java is run when you type jav. So change that order and you should be set.

If that isn't possible a simple
 
alias jav='/path/to/the/right/jav'

in your ~/.bashrc will also do the trick.
0
 
k061198Author Commented:
After a while I got it
thanks
/k
0
All Courses

From novice to tech pro — start learning today.