Eclipse .classpath in SVN: JRE collision

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.:

  • Android: Having trouble working with Camera source code
  • SVN checkout fails with “chunk delimiter was invalid” - what can be done?
  • How to make eclipse remember ssh key passphrase?
  • No repository found containing: osgi.bundle and org.eclipse.update.feature
  • Automatically update text in many documents in eclipse or any editor
  • Why does my eclipse project not have a build path?
  • <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?

  • Strange xml error: Incorrect line ending
  • I have just created small android project in Eclipse, which files I should add to version control?
  • svn command line from eclipse
  • What is the meaning of colored lines in commit graphs drawn by Eclipse?
  • Eclipse, Git - Keyboard Shortcut, How to use?
  • What is the proper way to do a Subversion merge in Eclipse?
  • 2 Solutions collect form web for “Eclipse .classpath in SVN: JRE collision”

    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)

    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"/>
    

    enter image description here

    Git Baby is a git and github fan, let's start git clone.