thank you all for your tips.

I had success in two ways.

first way:
changed path and added setenv in default-class in /etc/login.
did not work first , had to change .profile of my user, because setting of
PATH in .profile eliminated setting in login.conf. also /etc/skel/.profile
had to be changed for future users.

second (and finally preferred) way:
- created /etc/profile:
# sh/ksh initialization

export JAVA_HOME=/usr/local/jdk-1.5.0

PATH=/usr/local/jdk-1.5.0/bin:$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6
/bin:/usr/local/bin:/usr/local/sbin:/usr/games:.
export PATH HOME TERM

- changed .profile of my user to not override /etc/profile-PATH:
# $OpenBSD: dot.profile,v 1.4 2005/02/16 06:56:57 matthieu Exp $
#
# sh/ksh initialization

PATH=$PATH
export PATH HOME TERM

- changed /etc/skel/.profile for further users
# $OpenBSD: dot.profile,v 1.4 2005/02/16 06:56:57 matthieu Exp $
#
# sh/ksh initialization

PATH=$PATH
export PATH HOME TERM

thank you all again!

Test:
$ cd /usr/local/jdk-1.5.0/demo/jfc/Stylepad/
$ java -jar Stylepad.jar

Welcome in Alice's Wonderland!
-- 
View this message in context: 
http://www.nabble.com/howto-set-global-environment-variable-%28e.g.-PATH%2C-JAVA_HOME%29-tf4236252.html#a12109189
Sent from the openbsd user - misc mailing list archive at Nabble.com.

Reply via email to