Start Eclipse and report an error: java was started but returned exit code = 1

 Due to the work relationship, I changed a laptop. After downloading Eclipse from the official website and decompressing it, I found that a prompt box always pops up after Eclipse starts, as shown in the figure:

 
启动Eclipse <wbr>报错:java <wbr>was <wbr>started <wbr> <wbr>but <wbr> <wbr>returned <wbr>exit <wbr>code <wbr>= <wbr>1

Unable to start. Feedback from the Internet shows that there are mainly the following reasons:
   (1) There is Chinese in the installation path;
   (2) The downloaded version is not compatible with the operating system;
The solution for this netizen is:
  (1) The installation path cannot contain Chinese;
  (2) Download the version that matches the system;
  (3) Upgrade java;
 
      But I don't have any of the above two reasons, so it is impossible to solve it with the above method. The information from the pop-up box (D:\Program Files\Sysbase\Shared\Sun\JDK118\bin\javaw.exe) is probably The problem of jdk, so modify eclipse.ini according to the solution of netizens:
  
启动Eclipse <wbr>报错:java <wbr>was <wbr>started <wbr> <wbr>but <wbr> <wbr>returned <wbr>exit <wbr>code <wbr>= <wbr>1
 Add the JDK path of the red box to the file, restart eclipse, and everything is done!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326320183&siteId=291194637