2011-05-30

Java Control Panel Icon "Application Not Found"

Howto: Fix the "Application not found" error in the Java Control Panel icon. These same steps may be useful for other malfunctioning Windows Control Panel icons.
 
The Java Control Panel Windows icon may be damaged or corrupted.
Attempting to launch the icon results in "Explorer.exe : Application not found".

Note how the control panel icon is a generic icon, without the Java logo:






When working correctly, the icon looks like this:


This problem appears to be an artifact from previous JRE installations and Sun's installation routines were flawed.

These steps were originally written for Windows 7.  Several readers have reported this works also in Windows 10, which I have not tested. 

Related articles:
Java Cache sizes are pigs.  Whittle them down to size.


Immediate workaround:

Re-installing JRE (the Java Runtime Environment) does not resolve the problem.

If needed, the Java Control Panel can be launched manually, even if the control panel icon is missing or corrupt.  Your path or version may be different.  The steps below show how to find the exact path:

Windows 7:
C:\Program Files (x86)\Java\JRE6\bin\Javacpl.exe

Windows 10 - 
C:\Program Files (x86)\Java\jre1.8.0_101\bin\javacpl.exe

As a side note, when launching the javacpl in this fashion, other-mouse-click the .exe and choose "Run as Administrator".  Running as Administrator resolves a bug where changes in the Control Panel (especially Auto-update changes) do not stick. This is true even when the icon is working properly. Sun/Java is aware of this issue.


Permanent Solution:

To fix this problem you need to know the name of the executable that drives the Java Control Panel.  Unfortunately, control panel icons often hide the name of the actual program.  Follow these steps to determine the .exe's underlying name.

If you already know the name of the executable, from above, skip to step 1.

e.g.
Windows 7 - usually:
Program Files (x86)\Java\JRE6\bin\Javacpl.exe
 


Windows 10 - 

C:\Program Files (x86)\Java\jre1.8.0_101\bin\javacpl.exe


A. Determine the name of the program. 

In the Control Panel,"Other-mouse-click" (right click) the failed icon
Click "Create Shortcut".
The shortcut will be placed on the desktop, with no message or other prompts.

B. Locate the new Desktop icon. 

"Other-mouse-click" the new Java desktop icon
Choose "Properties"

Note: In this case, the Java Control Panel icon's name will be similar to 'Control Panel\All Control Panel Items\Java' -- which is not the actual executable's name -- and is not very useful. Most Control Panel icons do not display the target-path and the true name is hidden in the registry.  Continue with the remaining steps in order to find the real name

C. Discover the actual path by clicking "Change Icon".

If the underlying executable is corrupted or missing, the displayed error message will show the actual path. For example, the Java Control Panel reports "Windows can't find the file C:\Program Files\Java\JRE6\bin\javacpl.exe".  (In Windows 10, you can copy this path and filename.)

Note the path and filename.
Use this to find the registry value in the next step.

Example found path (depending on your version, etc.):
C:\Program Files\Java\JRE6\bin\javacpl.exe
C:\Program Files (x86)\Java\jre1.8.0_101\bin\javacpl.exe


Removing the Control Panel Icon:

Assuming you know the path to the Control Panel's icon (see steps above), use Regedit to fix the malfunctioning key. Exercise some care when editing the registry:

1. Launch the Windows Registry Editor with a Start, Run, "regedit.exe"

or type "regedit" in Windows 10 search.
or type the "WindowsKey+R", "regedit.exe"
or see this article for how to expose the Windows 7 Run command - Recommended



2. Position the cursor at the top of the Registry tree, on "Computer".

3. Type Ctrl-F (find) and search for the executable's name. 

Important, when searching, use a partial path, not the full name.

For example, the actual if the fully-qualified path name is:
C:\Program Files\Java\JRE6\bin\javacpl.exe

... search for this partial string:
Windows 7:  "\bin\javacpl.exe" (no quotes)
Windows 10: "\bin\javacpl.exe,"  (comma, no quotes)



Searching for a partial string avoids problems with 'Program Files (x86)' vs "Program Files" or differing version numbers, etc..

4. Expected Results:

Windows 7:
For the Java Control Panel, expect to find this registry key GUID:

HKEY_Classes_Root\CLSID\{4299124F-F2C3-41b4-9C73-9236B2AD0E8F}

Windows 10:
HKEY_Classes_ROOT\WOW6432Node\CLSID\{4299124F-F2C3-41b4-9C73-9236B2AD0E8F}

In either case, be sure this key is within "HKEY_Classes_Root\" and "CSLID" and not in another location in the registry.


Confirm by opening the key; on the detail side, you will see javacpl.exe lurking within.

If you find a hit outside of \CLSID\{4299124F...,  press F3 to continue searching.
I have noted in Windows 7, this is usually the first key you will find. 

5. On the tree-side, Delete the top-folder {4299124f...E8F} and all items within.

Do not delete the CSLID folder.
Close Regedit.
Close the Control Panel

If Windows 7 and if the "Wow6432Node" key is found, you may have overshot the CSLID key. Confirm you started the search at the top of the tree. If you still cannot find the key, do not continue with the rest of this article.


Test the results:

Important: Close and re-open the Windows Control Panel.

The 'generic' Java icon should be replaced with a properly-formed Java icon and the control panel icon should behave properly.




If the control panel still mis-behaves, consider re-installing the Java (www.Java.com).


The Correct Registry Key:

2017.02 - Author's notes.
I have removed the Registry-key merge from the article because of new differences in Java and differences between Windows 7 and 10.


Re-Installing Java:
This article is not recommending a re-install of Java to fix this problem (the author found it did not help), but from reader comments, many have attempted to re-install.  Be aware if you do, be sure to install the 32-bit version of Java -- even if you have a 64-bit operating system.

Reader Ronald Arnold, Germany, reported installing the 64-bit version of JRE, followed by the 32-bit version caused this problem.  I am sure he is correct, but in my case, I have never installed the 64-bit JRE -- I suspect there are multiple causes for this control-panel icon problem.


Other Control Panel Icons:

If you are searching for other non-Java Control Panel icon problems, this registry key may be of interest:

HKLM\Software\Microsoft\Windows\CurrentVersion\Control Panel\CPLs.

Be aware the Java Control Panel does not live in this location. Only a few system control panels live here but I could imagine other vendors sticking something in here.

Your unregistered comments on this article are welcome.

Related articles:
Java Cache sizes are pigs.  Whittle them down to size.

Streamline Windows 7 Start Menus
Turn off UAC Nags on Start Menu Items
Recommended Win7 Explorer Changes

Related Links:
I have not used this utility, but in the event of a complete java failure, this link may be of interest:  Completely uninstall all Java using a beta product called JavaRA:


Keywords:
Java control panel, java.cpl, javacpl.exe, JRE

2011-05-01

Securing Windows 7 from Offspring

Commentary and How to: Lock down a child's computer.

This article is obsolete.
See the Windows 10 version:

https://keyliner.blogspot.com/2020/02/windows-10-administrative-accounts.html


My youngest daughter nonchalantly said, "Dad, my laptop is infected with a virus." This is the first time this particular child had trashed the machine and 3 years was a good run without major problems. This made me wonder about the wisdom of giving her administrative rights on the computer.

The Virus
When the virus attacked, both Vista and Windows 7 prompts with permission screen (UAC - commonly called the Nag). The virus presents itself by enticing the victim with a game or some other program of interest. Most people will see the UAC Nag screen and click "Allow." You've probably done this yourself -- clicking Allow -- without giving it a second thought. In other words, people purposely install the virus, not realizing the payload.

Here is the sneaky part: The virus installs the program you want (usually a game), then it slips-in the malware -- where it waits a few days before showing itself. This way you won't remember where you caught the bug.

Especially with Vista, many computer owners disabled the UAC and they get their viruses installed automatically, without any prompts. Disabling UAC is somewhat foolish but at the same time the feature is useless if everyone mindlessly clicks Allow. My rule is simple: do not allow any program to install itself from the web unless you are confident of the vendor. How much you pay for the content is an indicator on how safe it is; free may not be safe.

Administrator vs Standard Users


As I looked at my daughter's computer, I realized it was running an ancient copy of A-VG anti-virus (no longer recommended) and was behind in other maintenance. It was also running Windows Vista. Rather than clean the virus, I decided to salvage the data, format the hard disk and install Windows 7.

With Windows 7, I contemplated a change to security. Windows allows users to be an "Administrator" or a "Standard User". By default, Administrator gives the user near-full control of the PC. Because my daughter had administrator rights, she was free to do as she pleased.

What would happen if I changed her to a Standard User? For a child's computer, this may be a good solution. With a non-administrative account, when she attempts to install an application, by accident or by design, she will be presented with an Administrator's login and cannot proceed. When the administrator logs in, they will be presented with the UAC nag, as expected. Doing this essentially locks-down the PC. This design works in Windows Vista and Windows 7, but does not work well in XP.


The Setup

Follow these steps to configure a child's secured desktop.

1. Ideally and optionally, install all needed programs, service packs and other updates, getting the computer into a good state before setting new security.

2. Important - Build an Administrator Account:

Before doing any of this work, you must make a new Administrator's account -- one where you do not tell the child the password. You must complete this before locking down the child's account or you will lock yourself out of the computer. You can make more than one administrator's account, if desired.

a. Start, Control Panel, User Accounts, "Manage another Account"
b. Click "Create a new Account"
c. Name the account "Admin" (or other name); mark as "Administrator"
d. Click the newly-created account; choose "Create a password". Be sure to fill out the password hint; this is a password you do not want to loose.

3. Login to the new account:

a. Click Start, (Shutdown: submenu); "Log off"
b. Login as Administrator

4. Change the child's account:

a. Start, Control Panel, User Accounts, "Manage another account"
b. Select the child's account
c. "Change the account type"; set to Standard User.

Results:
Your child will be prompted for an administrator's account before he can install any software or make any system-wide changes. If you were wise, you would not tell them the password. You can log in any time and install things as you-please.

Windows system updates will still run as-before (if set to automatic, they will install on their normal schedule), but applications will prompt for permission before updating, which can be a nuisance. Because of this, you should periodically login to the device and complete various updates for Java, Firefox, etc.

Update:

I still recommend these changes for children's accounts.  But with this said, my Niece managed to install a new virus, even though she was a defined as a standard user.  I am still trying to determine how she did this.  But there was one bright side to this setting, the virus was not able to install itself in all of the places it would normally have rights.  I suspect the cleanup was a easier than it would have been otherwise.

Finally, one closing note: Having a backdoor administrative account -- even if it is different than your own personal administrative account, is useful for cleaning some of the more simple viruses your machine might catch. Simple viruses may only infect the current user and the backdoor account is one way to clean up the mess.


See these Keyliner articles for other virus articles:
Microsoft System Sweeper - Bootable Antivirus - Highly Recommended
Removing Win32 Cryptor
Removing Win7 Anti-Virus
Removing Personal Security Virus
Securing Windows 7 from your Children
Microsoft Security Essentials