[英]Eclipse: change JDK for all projects in Workspace
I have received a whole bunch of Eclipse Projects as a ZIP-File.我收到了一大堆 Eclipse 项目作为 ZIP 文件。 I imported all of them into my new Workspace dedicated for this Task.
我将它们全部导入到专门用于此任务的新工作区中。 They are all preconfigured from the other Dev's Workspace.
它们都是从其他开发人员的工作区预先配置的。 In general I don't mind, so i do not have to setup every one of these Plugin-Projects.
一般来说,我不介意,所以我不必设置这些插件项目中的每一个。
What i do mind is that each and every Project is set to run with a specific JRE from the other guys installation (which I obviously don't have).我在意的是,每个项目都设置为使用来自其他人安装的特定 JRE(我显然没有)运行。 Is there a convenient Way to change all the Projects in my Workspace to the Workspace default JRE?
是否有一种方便的方法可以将我的工作区中的所有项目更改为工作区默认 JRE?
I am really not looking forward to right click on every of these ~30 Projects and change it manually.我真的不期待右键单击这 30 个项目中的每一个并手动更改它。
If they are not Maven or Gradle projects, you can change the .classpath
XML files accordingly ( <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/..."/>
) using a shell/batch or Ant script.如果它们不是 Maven 或 Gradle 项目,您可以使用 shell/ 相应地更改
.classpath
XML 文件( <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/..."/>
)批处理或 Ant 脚本。 Then do a refresh (eg by selecting all projects and hitting F5 ) so that Eclipse is aware of the change.然后进行刷新(例如,通过选择所有项目并按F5 ),以便 Eclipse 知道更改。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.