1826414 Members
4185 Online
109692 Solutions
New Discussion

CLASSPATH env variable

 
SOLVED
Go to solution
Shivkumar
Super Advisor

CLASSPATH env variable

Hi,

The CLASSPATH environent variable is usually set by issuing the command (say for example) #CLASSPATH=$CLASSPATH:/home/shiv
and secondly, it can also be put in user's .profile file.

My question is: Is it possible to set the CLASSPATH which is application for everyone on the box ?

Thanks,
Shiv
6 REPLIES 6
Arunvijai_4
Honored Contributor
Solution

Re: CLASSPATH env variable

Hi Shiv,

My question is: Is it possible to set the CLASSPATH which is application for everyone on the box ?

Yes, You can easily do it by editing /etc/profile and add entry

export CLASSPATH=$CLASSPATH://home/shiv or whatever.

Save and exit vi. Now, from shell you can just execute by

# . /etc/profile

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Senthil Kumar .A_1
Honored Contributor

Re: CLASSPATH env variable

Hi Shiv,

If you want this variable applicable to all the users, then try incuding this variable in /etc/profile file. Please remember /etc/profile is only root editable.


Regards,
Senthil Kumar .A
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)

Re: CLASSPATH env variable

shiv

you can accomplsh it by sipmply adding this entry to the /etc/profile file

inventsekar_1
Respected Contributor

Re: CLASSPATH env variable

HI shivkumar,
Little more about the login process:

for ASCII logins,
step 1: Login screen
step 2: /etc/profile
step 3: ~/.profile
step 4: ~/.shrc or .kshrc (optional)

for CDE logins:
step1: CDE login screen
step2: /etc/dt/config/Xstartup
step3: /etc/profile(optional)
step4: ~/.dtprofile
step5: ~/.profile(optional)
step6: ~/.shrc or .kshrc (optional)

so, the /etc/profile is used for the system wide customizing user accounts.
Be Tomorrow, Today.
inventsekar_1
Respected Contributor

Re: CLASSPATH env variable

HI shivkumar,
Little more about the login process:

for ASCII logins,
step 1: Login screen
step 2: /etc/profile
step 3: ~/.profile
step 4: ~/.shrc or .kshrc (optional)

for CDE logins:
step1: CDE login screen
step2: /etc/dt/config/Xstartup
step3: /etc/profile(optional)
step4: ~/.dtprofile
step5: ~/.profile(optional)
step6: ~/.shrc or .kshrc (optional)

so, the /etc/profile is used for the system wide customizing user accounts.

i think u can understand clearly now.

keep walking,
SEKAR
Be Tomorrow, Today.
inventsekar_1
Respected Contributor

Re: CLASSPATH env variable

Shivkumar,
assign points to only one,
the page error and i submitted again..

even though its telling "page error" its submitting the page. i already told this in the "question about ITRC forums".

Keep walking,
SEKAR
Be Tomorrow, Today.