Remove Java’s system tray icon – permanently.
If you have the Java Runtime Environment installed on your Windows (Vista) system – and chances are you do – you may have tried disabling that Java system tray icon without much luck. The problem lies in registry permissions, and the solution lies right here!
As the Administrator user in Windows, you can easily go in to the Java control panel and disable the “Place Java icon in system tray” setting and it will stick (meaning the setting actually gets saved in the registry). Problem is though, the setting seems to be per-user, so you’ve only disabled it for your Administrator account – not much use for your normal user account(s) in Windows now is it.
When you log in as one of your normal users in Windows and try to disable that same setting, every time you go back in to the Java control panel, the setting is re-enabled – it never gets saved. The setting that has to change is stored in the HKEY_LOCAL_MACHINE area of the registry which is not writable to normal users – you only have permissions to read settings, so we’re going to run a batch script as Administrator to allow us to change the setting. The reason the fix is a batch script is for simplicity; 1) if you run RegEdit as Administrator, you only have access to the Administrators files (not your current users files), so importing a registry file easily won’t work; 2) you can’t “merge” a registry file as Administrator. For those of you who are skeptical of batch files, just open it in a text editor to see exactly what it does.
For those of you who don’t have this problem – chances are you’re logged in to Windows as an Administrator-level user account which is why you’re able to simply use the Java control panel(s) to disable this setting. If that’s the case – you don’t need to follow these instructions… but you should consider what you’re doing by browsing the Internet under such an account!
Download the hide-system-tray.bat batch script, save it to your desktop and right-click it and select “Run as Administrator”. You may be prompted for a password from Windows UAC; type in your Administrator account password and that’s it – well, almost it…
You should keep this script handy because every time your Java Runtime Environment is updated, this setting apparently gets set back to it’s default value so you will have to re-run this batch script. Thankfully it’s smart enough to hopefully work on all versions of Java (this statement refers to the fact that it can “seek out” the correct registry key to update, since it incorporates the Java version number in to the registry key that has to be updated).