Home > General > Remove Java’s system tray icon – permanently.

Remove Java’s system tray icon – permanently.

March 26th, 2009 Leave a comment Go to comments

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).

  1. Deven
    April 15th, 2010 at 19:05 | #1

    This convenient batch file works really well. Those icons have been bothering me for a long time. Thanks!

  2. etalmar
    July 31st, 2010 at 22:34 | #2

    Batch file does not work in windows 7 64-bit. I followed the instructions to the letter, but the system tray icon still appears in my notifications box, then disappears within a few seconds after I leave the page that has the java applet on it.

    If that isn’t strange enough, under the settings tab in the java console, the box for “Place Java icon in system tray” is empty – meaning unchecked. So, although the bat file did remove the check mark from the Advanced settings area, it did not prevent the icon from appearing in the system tray.

    • August 1st, 2010 at 00:10 | #3

      I have Windows 7 x64 as well and have also noticed the same effect you describe. I checked in to it and couldn’t find anything to get rid of the tray icon, as it seems the registry settings are indeed working correctly (or are at least set correctly). My original beef with the Java icon was that even after the browser was closed (in my case Firefox), it was still there and Java was still loaded and running. It seems now that Firefox at least releases Java after the browser is closed (perhaps after the tab/window that had the Java app as well) which is certainly a step forward.

      If I ever do find out how to make the Java tray icon never show up in any circumstance, I’ll be sure to update this thread.

  3. Jarkko Laaksonen
    August 16th, 2010 at 23:05 | #4

    Sadly this doesn’t work, at least with the latest Java. It’s just amazing how far the makers go to have that pesky icon in there despite the user’s preferences, even W7’s own controls can’t hide it. The Java software itself ignores this setting now and forces its icon in there.

    In the same category, good luck finding a way to disable autoupdating in the latest version… Mankind needs to get rid of this garbage for good.

  4. September 21st, 2010 at 23:35 | #5

    I am running JRE 6.0 Update 21 on Windows 7 64-bit, and the system tray icon setting is not stored per user. There is only one registry key in the LOCAL_MACHINE node, which automatically takes effect for all user accounts.

    As an alternative to the batch file, you can just find the javacpl.exe in the bin subdirectory of your JRE installation, and run it as administrator to change the settings. They should be stored correctly then.

    • September 22nd, 2010 at 22:56 | #6

      @Daniel, the setting in the registry that you mention is the setting that the batch script modifies; it *should* affect all users, however the setting appears to be ignored by the software currently as this setting (which is what the Java control panel modifies as well) appears to be ineffective. If you think you’ve got it working, start a Java program on your system and tell me if the system tray icon appears or not (it will).

  5. March 7th, 2011 at 07:49 | #7

    Indeed odd how it’s not respected since I see using Process Moinitor java.exe accesses correctly twice:

    HKLM\SOFTWARE\Wow6432Node\JavaSoft\Java Plug-in\1.6.0_24\HideSystemTrayIcon

  6. Someone
    April 7th, 2011 at 02:24 | #8

    Daniel :
    I am running JRE 6.0 Update 21 on Windows 7 64-bit, and the system tray icon setting is not stored per user. There is only one registry key in the LOCAL_MACHINE node, which automatically takes effect for all user accounts.
    As an alternative to the batch file, you can just find the javacpl.exe in the bin subdirectory of your JRE installation, and run it as administrator to change the settings. They should be stored correctly then.

    This worked for me on Win 7 SP1 64-Bit with Java 6 Update 24

  1. No trackbacks yet.