• Register
1 vote
730 views

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

Please log in or register to answer this question.

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: 

 -XX:-UseCompressedOops 

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;

-XX:-UseCompressedOops

-vm

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.

Note:

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 2
3,890 points

Related questions

1 vote
1 answer 5 views
5 views
Problem: Please help me figure out this problem: Java was started but returned exit code.
asked Mar 25 PkGuy 23.5k points
1 vote
1 answer 8 views
8 views
Problem: I get this warning so any solution for this ? A promise was created in a handler but was not returned from it.
asked Mar 30 PkGuy 23.5k points
0 votes
1 answer 33 views
33 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, 2020 LizzyM 6.1k points
1 vote
1 answer 7 views
7 views
Problem: Please help me to solve it out : java was started but returned exit code 13 eclipse
asked Mar 26 MUHAMMAD MUNEEB 83k points
1 vote
1 answer 4 views
4 views
Problem: I need a help , How I can fix this : java was started but returned exit code=13 eclipse
asked Mar 26 MUHAMMAD MUNEEB 83k points
0 votes
1 answer 26 views
26 views
Solve this. Can anyone help me?
asked Dec 15, 2020 TeamScript 13.5k points
1 vote
1 answer 15 views
15 views
Problem: Can someone please help fix this uncaught error : java was started but returned exit code 1
asked Mar 26 MUHAMMAD MUNEEB 83k points
1 vote
1 answer 10 views
10 views
Problem: Why I got the error : java was started but returned exit code=1
asked Mar 26 MUHAMMAD MUNEEB 83k points
1 vote
1 answer 3 views
3 views
Problem: Can anyone tell me the solution of this problem? java was started by returned exit code=13 eclipse
asked Mar 26 MUHAMMAD MUNEEB 83k points
1 vote
1 answer 4 views
4 views
Problem: Can someone please help fix this uncaught error : java was started by returned exit code=13 in eclipse
asked Mar 26 MUHAMMAD MUNEEB 83k points