I was having eclipse on my system (eclipse 3.6 – helios version), and a week ago, I decided to set it up for doing Android programming in Java.
When I opened Eclipse, I got the following error :
Java was started but returned Exit Code = -1
The error was same as shown in this image ( i have taken this image from the world wide web )
I googled this error and found that many people had faced the same error and there were many solutions available to this problem.
Most Common Solution : One of the most common solution that I found was of adding some lines to eclipse.ini file, For example: The path to the javaw.exe file. Adding some arguments to eclipse.ini file was also suggested.
This solution had solved the problem of many people, but, it lead to some other errors in my case( example : unable to find java virtual machine on the specified path).
I tried re-installing eclipse but the problem remained as it is.
Then, I decided to re-install my jdk and jre to the latest versions that were available.
I removed all the older versions and re-installed latest available versions of jdk and jre.
When I tried starting eclipse again, it started.
This solved my problem
If you are facing the same problem, then I suggest you give it a try once to re-install jdk and jre, and, see if it can help.
All the best!!