Showing posts with label Java Runtime. Show all posts
Showing posts with label Java Runtime. Show all posts

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. 



6 Apr 2013

Uninstall Video Performer Manager


Introduction
Video Performer (Manager) is dubious. It causes Java to give the error: 'Could not create the Java virtual machine' (see previous article for more details) and it might be doing other things - who knows? In my opinion it is best to remove this software from your computer.


Control Panel
You can attempt to uninstall Video Performer and Video Performer Manager from Control Panel.


After uninstalling, shut down, restart the computer. However, it is likely that Video Performer Manager is still running on your computer! 


Process Explorer
To check and see if Video Performer Manager is still present on your computer, see if it is running in memory. You can use the Task List but a better alternative is Process Explorer, it is a free, small and light utility from Microsoft:


In the example above you'll see I found two dubious files, the obvious videomnger.exe and also ibsvc.exe which is also from the same company.

In Process Explorer right click on a process exe and you can see where the file is stored on your computer. In the above example the files were in these locations:

C:\Documents and Settings\All Users\Application Data\IBUpdaterService
C:\Documents and Settings\All Users\Application Data\Video Performer Manager


Ideally we should delete these exe files manually. This will stop them running.


Kill Process and Delete the EXE
Before deleting the exe files you must remove them from memory. Process Explorer has an option 'Kill Process'. Select the process exe you want to kill and press Shift-Delete (or right click and Kill Process Tree).

In my example I did this on ibsvc.exe and it worked, it disappeared from the Process Explorer view.
From Windows Explorer I deleted the folder C:\Documents and Settings\All Users\Application Data\IBUpdaterService and all it's files/folders. It worked! After restarting the computer ibvsc.exe had gone, when I looked in Process Explorer it was not there and it definitely was not on the C: drive any more.

However, when I tried the same procedure with videomngr.exe nothing happened. I could not kill the process and I could not delete the file.


File Assassin
If you can't kill a process or delete a file from the computer, try File Assassin, it is a free program from MalwareBytes.

Run File Assassin, click the [...] button and select the file you want to delete. For Video Performer Manager:

C:\Documents and Settings\All Users\Application Data\Video Performer Manager\videomngr.exe

Click  Use delete on Windows reboot functions (as shown in the screen shot above)

Click the Execute button


Also run File Assassin again, this time select the dll file by the same name:
C:\Documents and Settings\All Users\Application Data\Video Performer Manager\videomngr.dll

Click  Use delete on Windows reboot functions (as shown in the screen shot above)

Click the Execute button

Shut down and restart the computer (do not logoff).

When Windows finishes loading up again, check in the C:\Documents and Settings\All Users\Application Data\Video Performer Manager folder, the exe and dll files should be gone now. At this stage in Windows Explorer you can delete the Video Performer Manager folder without any problem, this will remove the remaining files.


Clean Up
If you had Video Performer Manager installed then maybe other nasties are lurking on your computer? Here's what to do:

Scan your computer with an anti-malware scanner - I recommend MalwareBytes. There's a free version that is very capable.

Clean your registry and remove old/temporary files - I recommned CCleaner. It's also free and excellent, you may even find that your computer runs a little faster after using it.


Conclusion
If you uninstall a program, restart your computer and double check to see if it's still installed or not. Some programs like Video Performer Manager are sneaky and will live in multiple places on your computer. You can use Process Explorer to check memory and to find where programs are stored. If you can't delete a file use File Assassin.

Utilities like File Assassin and Process Explorer are small and come in 'portable' version which means they are just exe files you can run from a USB flash drive. If you are working in a service desk or providing technical support of any kind, I really recommend you carry these with you at all times. They are very handy!



15 Feb 2013

Could not create the Java virtual machine

Problem
When starting a Java application the message appears:
Java Virtual Machine Launcher
Could not create the Java virtual machine.

The solution for this issue varies. Here are some alternative solutions:


Solution 1
Nine out of ten times this can be fixed by reinstalling Java Runtime. I strongly recommend you look in Control Panel | Add and Remove Programs and remove (uninstall) all copies of Java Runtime you have. Then make sure you shut down, restart the computer.

Download Java Runtime from http://www.java.com/en/download/manual.jsp
Install Java Runtime.
All should be well...


Solution 2
I had one situation where even after reinstalling Java Runtime three times it did not make any difference, the 'Could not create the Java virtual machine' error just came up again and again.

I checked the computer for anything that looked strange and out of place. In Task Manager I saw a program called ibsvc.exe. It wasn't familiar to me, I did a search on the web and found this website description: http://greatis.com/blog/adware/ibsvc-exe.htm
It's part of software called InstallBrain from PerformerSoft --- it looks very dodgy, most likely spyware.

To remove it I killed the ibsvc.exe process in Task Manager and immediately deleted the ibsvc.exe from:
C:\Documents and Settings\All Users\Application Data\IBUpdaterService 

That didn't solve the problem, still Java didn't work. But then I found another PerformerSoft related file: srchalgomngr.exe
In Control Panel I saw something called 'Algo Application Manager' by PerformerSoft LLC. I uninstalled this program and restarted the computer.

When I tried Java, it worked!!!

NOTE: 
I don't know for sure if these exe programs were stopping Java from running but it is very likely! Maybe on your computer you don't have these exe files but perhaps you have a similar problem? I recommend you look for any dodgy looking software, any spyware, any toolbars like Babylon or similar, remove them all! Run an anti-virus scanner on your C: drive, I recommend MalwareBytes. If you are experienced you will find Process Explorer useful.

UPDATE:
6th April 2013 - Please see the following article for more help:
http://mgxp.blogspot.ch/2013/04/uninstall-video-performer-manager_6.html



Solution 3
Make sure your Windows virtual memory is set correctly. I recommend you set it to 'System Managed Size'. You must shut down and restart the computer for the change to take effect. You can find out more details here: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sysdm_advancd_perform_change_vmpagefile.mspx?mfr=true


Solution 4
You can add runtime parameters to the Java Runtime startup. This did not help me but it is worth a try.

In Control Panel double click Java (or run javacpl.cpl), click the Java tab and View. Enter -Xmx512M into the runtime parameter box. If that doesn't help, try -Xmx300M. This is explained in more detail here: http://www.duckware.com/pmvr/howtoincreaseappletmemory.html


Conclusion
I hope one of the above solutions helps you solve this problem. As I mentioned above, usually it's solved just by reinstalling Java Runtime. On one occasion it was some possible spyware that after removal Java worked normally again. You will have to investigate and try each of the above solutions. Good luck!