Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

path for jdk

Posted on 2000-02-22
2
Medium Priority
?
269 Views
Last Modified: 2012-05-04
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
0
Comment
Question by:k061198
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
Reinier earned 150 total points
ID: 2546580
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
 

Author Comment

by:k061198
ID: 2553107
After a while I got it
thanks
/k
0

Featured Post

Quick Start: DOCKER

Sometimes you just need a Quick Start on a topic in order to begin using it.. this is just what you need to know to get up and running with Docker!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question