可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
I need to run eclipse(java 1.7) and STS 3.8.1 ( java 1.8) but if i select the java 7 as default i am getting error in the STS 3.8.1. I am using OS : ubuntu 14.10
Error : Version 1.7.0_80 of the JVM is not suitable for this product. Version: 1.8 or greater is required.
Or I select java 1.8
as default eclipse is not working fine.
My requirement is to build a Project using java 1.7 with STS.
and latest version 3.8.1 doesnot support the java 1.7.
and i try to search which version of STS support 1.7
but i am not getting any answer .
回答1:
This question is old, but for anyone looking at this in the future who can't install Java 8 or otherwise can't use the workaround in the other answer - 3.8.0 was the first version requiring Java 1.8, while 3.7.3 still plays nice with only Java 1.7.
回答2:
It is asking for jdk 1.8 to open and run the STS (eclipse). It will still allow you to build your project/code with whatever JDK version you want.
Install jdk1.8, set your JAVA_HOME and PATH env variables so that 1.8 becomes your default jdk. After this your should be able to open STS. Then setup project and set project's JDK to 1.7 or whatever you want.
I hope it helps.
回答3:
The STS 3.8.1 all-in-one distribution is based on Eclipse v4.6 which required Java 1.8 to start it. As @Jens mentioned, you can to Open Windows
-> Preferences
. Then open tree node Java
> Installed JREs
. After adding a new JRE/JDK, you can set it as default or delete others items.
Another option: if you have installed Eclipse 4.5, please visit https://spring.io/tools/sts/all
- Install STS 3.8.1 via Update Sites: open
Help
-> Install New Software...
. Just paste update site URL in the Wizard. - If you prefer install it offline, you can download STS Update Site Archives. Clicking the
Add...
button in the same Wizard, select the folder of unpacked zip file.
回答4:
I just set the jdk in the alternative jre value .