16 Nov 2015

Java - Unable to launch the application

When you try to start a Java application do you see the following message:
Unable to launch the application

Java error: Unable to launch the application

There are a few possible solutions - try each one in turn:


Solution 1 - Clear the Java Cache
The most common reason for 'Unable to launch the application' is that the files in the Java cache are corrupt or damaged in some way. You can clear the Java cache and when you run the application again it'll download a fresh copy of the application files. Follow these steps to clear the Java cache:

Control Panel 
Search for "java"
Click Java (you'll see the Java Control Panel)
On the 'General' tab, under 'Temporary Internet Files' click Settings
Click Delete Files (button near the bottom of the window)
Click OK

The above is explained in more detail here:
https://www.java.com/en/download/help/plugin_cache.xml


Solution 2 - Ensure 'Keep temporary files on my computer' is enabled
I've found recently (with Java 8 update 65 64-bit in particular) that on going to clear the Java cache the buttons were greyed out (disabled). In fact the first option 'Keep temporary files on my computer' is sometimes disabled! This cases the cache to be turned off, meaning that Java will not work.

Java Keep temporary files on my computer

Ensure that 'Keep temporary files on my computer' is enabled (ticked) - as shown above.

Click OK
Normally this will be fine but to be sure it is a good idea to restart your computer at this point.



Solution 3 - Reinstall Java
If all else fails, reinstall Java.

IMPORTANT: When you reinstall Java, first make sure you uninstall all existing copies of Java that are on your computer - they'll show up in the Control Panel programs list. Restart your computer. Then install a fresh copy of Java.

A fresh copy of Java can be downloaded from:
https://www.java.com/en/download/manual.jsp



UPDATE: May 2020
I've come across a new scenario where clearing the Java cache or reinstalling do not help. 


Solution 4 - Check the Routing and Firewall
When you try to start a Java application do you see the following message:
Unable to launch the application


Click Details


Error: Unable to load resource
If you see the Unable to load resource error it will also reference a URL. This is the location of the JAR file to download. 

As a test, copy and paste the URL into your browser. Does it successfully download the JAR file (or it might be a .GZ file)? If it fails, that is the problem. Somehow that file is being blocked somewhere in the route from the server to your computer. Check for any rules in the Router and especially any Firewall you have between the computer and the server (URL location). In the case I saw the file was being blocked on the network firewall. 



No comments: