spring-attic / spring-ide

Spring Development Environment for Eclipse
299 stars 126 forks source link

Java exit code 13 on startup #320

Closed tedepstein closed 5 years ago

tedepstein commented 5 years ago

I have just downloaded STS 3.95.RELEASE for Windows from https://spring.io/tools.

I'm running Java 8, 64-bit.

C:\Users\tedep>java -version
java version "1.8.0_172"
Java(TM) SE Runtime Environment (build 1.8.0_172-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode)

When I try to launch STS.exe, I get the following error message:

---------------------------
STS
---------------------------
Java was started but returned exit code=13
C:\Program Files (x86)\Common Files\Oracle\Java\javapath\javaw.exe
-Dosgi.requiredJavaVersion=1.8
-Xms40m
-Dosgi.module.lock.timeout=10
-Dorg.eclipse.swt.browser.IEVersion=10001
-Xmx768m
-jar C:\Users\tedep\Downloads\sts-bundle\sts-3.9.5.RELEASE\\plugins/org.eclipse.equinox.launcher_1.5.0.v20180512-1130.jar
-os win32
-ws win32
-arch x86
-showsplash
-launcher C:\Users\tedep\Downloads\sts-bundle\sts-3.9.5.RELEASE\STS.exe
-name STS
--launcher.library C:\Users\tedep\Downloads\sts-bundle\sts-3.9.5.RELEASE\\plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.700.v20180518-1200\eclipse_1705.dll
-startup C:\Users\tedep\Downloads\sts-bundle\sts-3.9.5.RELEASE\\plugins/org.eclipse.equinox.launcher_1.5.0.v20180512-1130.jar
--launcher.overrideVmargs
-exitdata 3464_c8
-product org.springsource.sts.ide
-vm C:\Program Files (x86)\Common Files\Oracle\Java\javapath\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Xms40m
-Dosgi.module.lock.timeout=10
-Dorg.eclipse.swt.browser.IEVersion=10001
-Xmx768m
-jar C:\Users\tedep\Downloads\sts-bundle\sts-3.9.5.RELEASE\\plugins/org.eclipse.equinox.launcher_1.5.0.v20180512-1130.jar 
---------------------------
OK   
---------------------------

So far, I haven't found likely reason for this in the README, nor in recent StackOverflow answers. Any help appreciated.

martinlippert commented 5 years ago

Not sure what this path (C:\Program Files (x86)\Common Files\Oracle\Java\javapath\javaw.exe) points to, but maybe it is not the JDK you would expect?

Please note that the JDK that you used to show the version information above looks like a 64bit JVM (JDK), the STS installation looks like a 32bit version of STS. However, the path that shows up in the error log (C:\Program Files (x86)\Common Files\Oracle\Java\javapath\javaw.exe) looks like a 32bit JDK install (because of the Program Files (x86) in the path, so that would fit with the STS install, but is maybe still not the right JDK that you would like to use.

I would recommend to use the 64bit JDK that you have installed together with a 64bit version of STS that you can download from https://spring.io/tools/sts/all.

If you would like specify exactly which JDK is used to launch STS, you can modify the STS.ini file in the same way than you would modify the eclipse.ini file, as described here: https://wiki.eclipse.org/Eclipse.ini

tedepstein commented 5 years ago

Thanks, @martinlippert ! Indeed, that was the problem.

https://spring.io/tools/sts/all has both 32- and 64-bit installers.

https://spring.io/tools is for the 32-bit version only. It might be a good idea to include that information on or near the download button.

If you want to track that suggestion here, you can leave the issue open; otherwise, feel free to close it.

martinlippert commented 5 years ago

Glad to hear that we found the reason here. And thanks a lot for the suggestion and I agree, would be good to have a hint on that page, too (or to take the platform architecture into account when showing the default download version on that page). But we are moving towards the release of STS4, the existing pages will be deprecated sometime soon and be replaced with the main page for STS4 (which will have 64bit downloads only). Therefore I tend to not modify the existing pages for now, focus on the new ones, and will close this item here. Hope that is fine with you.