• Register
1 vote

My java program is running but the eclipse IDE crashes and shows the error message-

“Java was started but returned exit code=1”

I have set my environment variables correctly on my “System Environment Variables” settings.

I have tried some other solutions found online but nothing worked for me unfortunately. 

Any help would be appreciated with thanks.

10 7 2
6,060 points

2 Answers

1 vote

Exactly the same error has been killing me for several days until I found a simple solution that worked for me right away that saved my life straigt away. 

I had to find eclipse.ini file (generally it resides on the installation folder of the eclipse.exe) and add the following simple command line to the end of the file: 


And I also found that people had the same error if they are not running the eclipse IDE as adminstrator.

Note: you may still get this error in special circumstances, so be aware of the java version, jdk version and other settings.

11 6 4
34,950 points
0 votes

Probably, this error means that you have done something wrong. You have to check;

  • Are you have the latest JDK (java development Kit) downloaded?
  • What is the architecture of your PC, 64 bit or 32 bit?
  • The architecture is the same as the JDK version because it should be the same.
  • Have you set the path in the environment variable like shown in the fix JVM not found error?

Fix java was started but returned the exit code-1:

Go to the eclipse folder and right-click on the eclipse.ini and then select the edit option.

Now add the following lines;



C:\Program Files\Java\jdk1.7.0_21\jre\bin\server\jvm.dll

The path of the JDK should be the same where you have installed the JDK.


The above error can also fix the Eclipse error: Java was started but returned exit code=2. Make sure that the –VM option occurs before the –vmargs command. This is because every command that occurs after the –vmargs is passed directly to the JVM.

Everything that is passed directly to the JVM. If you don’t know where the eclipse.ini file is. Regularly this is in the folder of your eclipse.exe.

That’s it, hopefully, you have successfully learned how to fix java was started but returned the exit code 1.


11 5 1
3,890 points

Related questions

0 votes
1 answer 24 views
Java was started but returned exit code = 13, error on Windows I saw the following error message after double clicking the ICE_SDK ice.sdk.product-win32.win32.x86_64 on Windows 10 after installation. I couldn't reproduce it when a first saw it two weeks ago.Somehow, I was ... . The work environment details are below. Java path: C:\Program Files (x86)\Java\jre1.8.0_111\bin How can I solve this?
asked Mar 16 LizzyM 6.1k points
1 vote
1 answer 22 views
Problem: I have installed eclipse for getting the taste of android coding recently. I am pretty new in eclipse as well as android. Could anyone please tell me why it’s showing java was started by returned exit code=13?
asked Mar 6 Gavin 15.3k points
0 votes
1 answer 1.7K views
Problem : I got stuck on below error I am trying to configure my SMTP mail on laravel “Expected response code 250 but got code "530", with message "530 5.7.1 authentication required "” Below is the configuration on .env MAIL_DRIVER=smtp MAIL_HOST=smtp.mailtrap.io ... I have tried to authenticate my SMTP on the env but I keep facing the above error so for now I am stuck on that error.
asked Feb 4 jwilliam 3.9k points
1 vote
1 answer 41 views
Problem: Learning programming is fun, but it becomes hectic alongside sometimes. I am a novice in C/C++ programming and I’ve written a program that should check student grade/mark but the program is not working for me. Please find my sample code snippet below and let me know ... ; break; case 3: print("Grade 3"); default: print ("Error"); } return 0; } Thanks for your kind concern guys.
asked Apr 9 Gavin 15.3k points