user3841180
user3841180

Reputation: 1

setting java compiler version in the project

I have multiple project which i have checked out from cvs.

when i see the compiler compliance level(which is there under each project-> properties->java complier) . it shows the compliance level=1.5(which is nothing but java 5).

Now wanted to change the compiler compliance level from 1.5 to 1.6..

please help me out in which file I should make the changes so that compliance level should get set to 1.6 so that I can check in the respect file into the cvs of the project.

so that next time if some takes the checkout of the project it should shows compliance level to 1.6 . automaticaly

I have gone through the .classpath file of project but i didn't get any things.

<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v6.0">
    <attributes>
        <attribute name="owner.project.facets" value="jst.utility"/>
    </attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
    <attributes>
        <attribute name="owner.project.facets" value="java"/>
    </attributes>
</classpathentry>

Upvotes: 0

Views: 757

Answers (1)

Saif Asif
Saif Asif

Reputation: 5668

Although you can achieve this by playing with the class-path file, how-ever I would advise you to take the easy way. .classpath file is for eclipse's internal use and is automatically managed by eclipse for each project as per the settings and properties that you configure.

Right click on the project --> properties --> Configure Build-path --> Libraries tab and change your JDK library to the one you desire ( 1.6 ) in this case. Next refresh the project and eclipse will automatically build the .classpath file for you. enter image description here Simply checkin this file on the svn and you are good to go. The next time someone checksout the project, the classpath file will configure the compiler version in their eclipse project as well.

Upvotes: 1

Related Questions