Java 带有 JDK 7 或更低版本的 Eclipse Neon
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/38076543/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse Neon with JDK 7 or below
提问by logger
When I compile / run the build on ant with eclipse neon on JDK 7 and below I got error message saying Unsupported must run on 1.8 or higher
. If I changed my ant and jdk to 8 on ant I got unsupported minior/major version
....
当我在 JDK 7 及以下版本上使用 eclipse neon 在 ant 上编译/运行构建时,我收到错误消息说Unsupported must run on 1.8 or higher
. 如果我在 ant 上将 ant 和 jdk 更改为 8,我会得到unsupported minior/major version
....
Is there a way to build with jdk 7 and below with eclipse neon? if I made this upgrade am I sacrificing all my previous changes and development?
有没有办法使用 eclipse neon 使用 jdk 7 及以下版本进行构建?如果我进行了这次升级,我是否会牺牲我以前的所有更改和开发?
采纳答案by greg-449
Eclipse Neon itself must be run using Java 8.
Eclipse Neon 本身必须使用 Java 8 运行。
You can still use older Java versions to run your programs. Configure the available JRE/JDKs in the Preferences in 'Java > Installed JREs'. Then configure your project or Run Configuration to choose the version you want to use.
您仍然可以使用较旧的 Java 版本来运行您的程序。在“Java > 已安装 JRE”的首选项中配置可用的 JRE/JDK。然后配置您的项目或运行配置以选择您要使用的版本。
回答by GAURAV ROY
Ideally Neon should be run on java 1.8 but you can run neon on java 1.7
理想情况下,Neon 应该在 java 1.8 上运行,但您可以在 java 1.7 上运行 neon
just change the java version in eclipse.ini file. Dosgi.requiredJavaVersion=1.7
只需更改 eclipse.ini 文件中的 java 版本。Dosgi.requiredJavaVersion=1.7
回答by K.Suthagar
You can edit like this following(make sure with your installation path),
你可以像下面这样编辑(确保你的安装路径),
-vm
/usr/lib/jvm/java-7-openjdk-amd64/jre/bin
-vmargs
-Dosgi.requiredJavaVersion=1.7
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Dosgi.requiredJavaVersion=1.7
-Xms256m
-Xmx1024m
-Declipse.p2.max.threads=10
-Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/