Changes to environment variables should take effect immediately, if you make the change via the main Properties dialog for the computer in question (go to My Computer | Properties | Advanced | Environment Variables). After the changes are saved, Explorer broadcasts a WM_SETTINGCHANGE
message to all windows to inform them of the change. Any programs spawned via Explorer after this should get the updated environment, although already-running programs will not, unless they handle the setting change message.
I'm not able to tell from your problem description what specific problem you're having with this. Can you tell us more about the specific scenario that isn't working?
This KB article may also be of use: How to propagate environment variables to the system
Actually this problem is due to the control panel requiring administrator privileges to allow the Java control panel to save your settings (it hasn't been fixed for ages, thanks to Sun Microsystems).
First, you need to find the Java Control Panel executable, in one of the following locations:
C:\Program Files\Java\jre[version]\bin\javacpl.exe
or
C:\Program Files (x86)\Java\jre[version]\bin\javacpl.exe
The path will differ depending on your system's architecture and which version of Java you have installed. For example, a 32-bit version of Java 7 installed on a 64-bit version of Windows will have it in:
C:\Program Files (x86)\Java\jre7\bin\javacpl.exe
Once you've found the file, right-click it and select "Run as administrator".
From there, un-check "Check for Updates Automatically" on the Update tab and click OK. You can verify that the setting has been applied by navigating to the same screen as you normally would through the Control Panel.
You can also check your running processes to see that jusched.exe
is no longer running - it was automatically terminated when you clicked OK.
Best Answer
I am unsure if the java applet will actually look at the environment variables before it starts, but what you can do it edit /etc/profile and add the following lines:
To make it a true tmp directory (as in the files go away when the session is ended, you'll want to edit the user's .bash_logout as well as the skeleton .bash_logout (/etc/skel/.bash_logout) to include the following:
The logout portion is dangerous is the variable doesn't get set and your logged in as root! I wouldn't add this to the root account or anyone that is a member of the wheel group! Proceed at your own caution.