If I change an environment variable can that be reflected in cygwin without restarting?

3

If I have an environment variable set up in windows xp, e.g. JAVA_HOME I can access this from cygwin. But if I change that environment variable through My Computer whilst cygwin is running, cygwin does not reflect the change. Is there anyway to get cygwin to update without having to restart it?

slashnick

Posted 2010-06-24T14:54:54.593

Reputation: 153

Answers

2

For command line applications, they will not recognize new changes like path until you restart them. Likewise, you can have a desktop icon shortcut and a quick launch shortcut and these can have different settings. The main EXE will accept changes, but will need to be restarted.

nicorellius

Posted 2010-06-24T14:54:54.593

Reputation: 5 865

2

No, but you can of course set it manually, using export JAVA_HOME=<whatever>. It's not like starting a new Cygwin shell takes a long time though ...

ak2

Posted 2010-06-24T14:54:54.593

Reputation: 3 387

It doesn't take long, but then you have to navigate to the appropriate directory. And suppose you had three Cygwin windows open ... – Eric Wilson – 2011-10-21T19:39:29.330

0

If you export the variable, then you only need to restart the process.

karlphillip

Posted 2010-06-24T14:54:54.593

Reputation: 971