STS launch error - Java was started but returned exit code=13

前端 未结 17 2152
别跟我提以往
别跟我提以往 2021-01-07 19:25

So I installed STS a while back now onto my Windows 7 64-bit machine, every time I try run STS I get the attached Java exit code=13 error below.

I don\'t have have E

相关标签:
17条回答
  • 2021-01-07 19:53

    The first step is like the is already related above: open the document parameters of configuration "STS" and send the commands below to "openFile":

    -vm
    C:\Program Files\Java\jdk-11.0.2\bin\javaw.exe
    

    To check the version of JDK, on your prompt do the command:

    java -version
    

    You will find in "build".

    If you still having the problem with JDK path not finded, the path to found your JDK on pc is:


    my computer -> archives and programs -> java -> jdk -> bin -> javaw

    when you reach at this, click and inspect the properties of and copy the route to put on command after -vm.

    0 讨论(0)
  • 2021-01-07 19:55

    On the STS page, the Download STS button downloads the version for 32-bit Windows by default. Under the download button, click See all versions (https://spring.io/tools/sts/all). From there you can click the menu button and select the 64-bit Windows version.

    0 讨论(0)
  • 2021-01-07 19:57

    Open "SpringToolSuite4.ini" or sts.ini and make sure you have javaw.exe path in .ini file.

    -vm
    
    D:\Projects\Softwares\JDK\bin\javaw.exe
    

    File should look similar as below.

    -startup
    
    plugins/org.eclipse.equinox.launcher_1.5.400.v20190515-0925.jar
    
    --launcher.library
    
    plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.1000.v20190125-2016
    
    -product
    
    org.springframework.boot.ide.branding.sts4
    
    --launcher.defaultAction
    
    openFile
    
    -vm
    
    D:\Projects\Softwares\JDK\bin\javaw.exe
    
    -vmargs
    
    -Dosgi.requiredJavaVersion=1.8
    
    -Xms256m
    
    -Xmx1024m
    
    -XX:+UseG1GC
    
    -XX:+UseStringDeduplication
    
    --add-modules=ALL-SYSTEM
    
    0 讨论(0)
  • 2021-01-07 19:59

    First you need to check that you are using 64 bit java. Next you need to point to that version of java in your STS.ini file.

    You can do this by specifying the -vm option in the STS.ini file. The -vm option must be placed after the other Eclipse-specific options (such as -product, --launcher.*, etc), but before the -vmargs option.

    -vm argument might look like:

    -vm
    C:\jdk1.7.0_21\bin\javaw.exe
    

    or

    -vm C:\jdk1.7.0_21\bin\javaw.exe 
    

    or

    -vm C:\jdk1.7.0_21\jre\bin\java.exe
    

    If you encounter Java was started but returned exit code=1 point the `-vm option to jvm.dll

    -vm
    C:\Development\Java\64bit\jdk1.7.0_09\jre\bin\server\jvm.dll
    

    Here is how I added it in my STS.ini file.

    -startup
    plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
    --launcher.library
    plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.300.v20150602-1417
    -product
    org.springsource.sts.ide
    --launcher.defaultAction
    openFile
    --launcher.XXMaxPermSize
    256M
    -vm
    C:\Program Files\IBM\Java71\jre\bin\java.exe
    -vmargs
    -Dosgi.requiredJavaVersion=1.7
    -Xms40m
    -XX:MaxPermSize=256m
    -Xverify:none
    -Dorg.eclipse.swt.browser.IEVersion=10001
    -Xmx1200m
    

    References:

    1. Eclipse Wiki page

    2. Stack overflow answer by DNA to similar question

    0 讨论(0)
  • 2021-01-07 19:59

    please make sure you download the 64bit version from https://spring.io/tools/sts/all.

    0 讨论(0)
  • 2021-01-07 19:59

    So basically when you go to Spring website, it doesnt understand your client OS and prompts you to download 32 bit version. I faced the same issue and explicitly had to download 64 bit version, by clicking on "see all versions". Also some suggested removing "C:\ProgramData\Oracle\Java\javapath" entry from Path, but while it is true if you have actually downloaded JDK 1.8, it is not going to help resolve the specific issue here.

    0 讨论(0)
提交回复
热议问题