Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
Reply to this topicStart new topic
> Where To Change Which?, config
post Jul 10 2005, 07:58 PM
Post #1

Whats this Lie-nix Thing?

Group: Members
Posts: 1
Joined: 10-July 05
Member No.: 5,252

Somewhere on my computer is some kind of map that tells the system which executable to run when I call a particular command. I can discover which particular executable it will run by typing something like

'which java'

This command may return '/usr/bin/java'. question is, where do i configure this? How can I tell my system that when I call 'java' I want to use something else, like '/opt/jdk1.5.2/bin/java'?

Go to the top of the page
+Quote Post
post Jul 11 2005, 12:43 AM
Post #2

RMS is my Hero

Group: Support Specialist
Posts: 862
Joined: 18-February 04
From: Wisconsin
Member No.: 2,404

export PATH

For your current session, type those lines.

To have this work for everyone, add that to the end of /etc/.bash_profile (or your .bash_profile in /home/username)

In /etc/profile you can add /path/to/bin/java at the end of PATH (should be near the top)

*Points finger at the author above him* They're a witch! Burn them!
Vist my website!
Join me in IRC! Server: Channel: #UnhandledExceptions
Go to the top of the page
+Quote Post
post Jul 11 2005, 03:21 AM
Post #3

Its GNU/

Group: Support Specialist
Posts: 1,284
Joined: 14-November 04
From: Southampton, Hampshire
Member No.: 4,165

Basically, any executable4s inside a directory listedn in $PATH can be accessed just by typing it's name rather than the full path.

So, you could juist creat a symlink in /bin that points to /usr/java/.... or, create a shell script that launches it.


Fixed your problem? Let us know! Online Event Management
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 23rd June 2018 - 08:51 PM