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.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Where To Change Which?, config
paulcon
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'. SO...my 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'?

Thanks,
Paul
Go to the top of the page
 
+Quote Post
Termina
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



QUOTE
PATH=$PATH:/path/to/bin/java
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: st0rage.org Channel: #UnhandledExceptions
Go to the top of the page
 
+Quote Post
DS2K3
post Jul 11 2005, 03:21 AM
Post #3


Its GNU/Linuxhelp.net
*******

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.

D


--------------------
Fixed your problem? Let us know!
richard@linuxhelp.net

www.Gathr.co.uk 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: 13th December 2017 - 03:34 PM