Eclipse .classpath in SVN: JRE collision

家住魔仙堡 提交于 2019-12-11 07:56:05

问题


I'm about to commit Eclipse .classpath and .project into SVN, following the good advice I got here on SO.

The problem is that some JRE definitions are unique to a developer's machine, e.g.:

<classpathentry kind="con" path="..JRE_CONTAINER/org..../Jeffs JRE"/>

If this line is committed, it fails on other machines that don't have Jeffs JRE.

Any idea for a workaround? Could the JRE definitions be shared as well?


回答1:


I never saw adding specific IDE configuration files as a good practice, but that's a different issue.

If you want to follow that path, you should use the variables.

Java Build Path > Add variable

Then you need to make sure that every single developer has those variables defined, everyone with their own paths.

(or use Maven to avoid these problems)




回答2:


In project properties > Java Build Path > Libraries > Double click on you JRE and then choose: Use Execution Environments instead of Alternate JRE or Workspace default JRE. You .classpath entry will be then something like this:

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>



来源:https://stackoverflow.com/questions/10371512/eclipse-classpath-in-svn-jre-collision

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!