click on the add library button. it brings your screen to point to the java location.
select "directory", button right besides jre home and point to the installed folder location.
even though you want to just 1.5 compiler project, you can achieve it by changing compiler settings in eclipse instead of removing 1.6 jre and add 1.5 jre.
goto -->java--compiler---> and change compiler level to `1.5` instead of `1.6`
as davidfmatheson suggested,
just be careful, especially if you're setting this up for a team of people to work on. if anyone uses anything that is new or changed in 1.6, it will compile, but not run in an environment with jre 1.5.
see the page set up jdk in eclipse. from the add button you can add a different version of the jdk...
the jdk (java_home) used to launch eclipse is not necessarily the one used to compiled your project.
to see what jre you can select for your project, check the preferences:
general → java installed jre
by default, if you have not added any jre, the only one declared will be the one used to launched eclipse (which can be defined in your eclipse.ini).
you can add any other jre you want, including one compatible with your project.
after that, you will need to check in your project properties (or in the general preferences) what jre is used, with what compliance level:
eclipse - specific project change jdk version -
if you want to change any jdk version of a specific project than you have to click ---> project --> jre system library --> properties ---> inside classpath container (jre system library) change the execution environment to which ever version you want e.g. 1.7 or 1.8.
in the preferences section under java -> installed jres click the add button and navigate to the 1.5 jdk home folder. then check that one in the list and it will become the default for all projects:
if you are using maven build tool then add the below properties to it and doing a maven update will solve the problem
click on the window tab in eclipse, go to preferences and when that window comes up, go to java → installed jres → execution environment and choose javase-1.5. you then have to go to compiler and set the compiler compliance level.
- How to change JDK version for an Eclipse project
- How to change tomcat version from 5 to 7 for a given Eclipse Project
- How to change the background color for changed files in eclipse project explorer?
- How to change java version and web version on org.eclipse.wst.common.project.facet.core.xml under .settings dir of eclipse project
- How to change minSDK Version in Eclipse Android project (recurring errors when saving)
- Eclipse is asking for an older version of JDK, how to change it to a newer one?
- How to change path for web project in eclipse
- How to change font size in Eclipse for Java text editors?
- How to change an Eclipse default project into a Java project
- How to simultaneously run all JUnit tests for a Eclipse Java project without Maven?
- How can I change font size in Eclipse for ALL text editors?
- How do I run Eclipse using Oracle's new 1.7 JDK for the Mac?
- How to create the pom.xml for a Java project with Eclipse
- How to change default JRE for all Eclipse workspaces?
- How to convert an Eclipse Android project to use Ant for build?
- How do I change in an eclipse web project the WebContent folder to something different?
- how do I get eclipse to use a different compiler version for Java?
- How to use Gradle to generate Eclipse and Intellij project files for Android projects
- How can I check/upgrade Proguard version when using it in Eclipse for Android development?
- How do i find out the JDK version Eclipse is using?
- How to install CVS client for Eclipse version 2018-09 (4.9.0)?
- Eclipse dark theme for windows: how to change the color of scroll bars and title bars to dark?
- How can I upgrade from Eclipse Java SE version to Eclipse for Java EE via Eclipse?
- How to (re)attach JDK sources for Eclipse on Snow Leopard?
- How do i configure eclipse to make use of different version of JDK
- How do I change the Java version of my "installed project facet" in Eclipse?
- How to change the Control+Space autocomplete shortcut keys in Eclipse for Android
- Eclipse - how to simultaneously switch working set for project explorer, call hierarchy, and search?
- How to use Linked Files in Eclipse for PhoneGap project with Android
- How Can I Tell Eclipse to Compile and Build a Project with a Different JRE Version than it Normally Does?
More Query from same tag
- OpenShift 3: Connect Java Webapp to PostgreSQL Database
- append function to add <li> with <ul> dynamically not working in android emulator,but works in browser's well
- Eclipse IDE - progress view show automatically when some progress
- Jboss 7 and eclipse indigo plug in giving error while starting server?
- How to link a C project with a C++ static library(using opencv) in eclipse
- Failure 1 (near "NULLenergy_rates": syntax error) on 0x2d7a30
- How can I grant access of my database to a user with a certain username and password which I am not using?
- How to use ToolBar/overflow icon in Android Card ui
- Updating Eclipse SDK Error
- can't set LayoutParams in onCreate
- What exactly does "attach context" mean in Eclipse Mylyn
- Control-M -> ENTER in Eclipse
- Use .net project with Eclipse on MAC with VisualStudio On line
- Eclipse RCP Inject into instance of IWizard
- Which file runs Eclipse to start a JBoss server
- Not able to view the Stack Trace console in eclipse Version: 3.2.1 .
- Can I access Maven properties as variables in Eclipse?
- Deploy Java EE Project in Weblogic
- Execute background action in Eclipse RAP application
- Identifying bugs using Selenium IDE
- PDT/Xdebug with Firefox
- Application will not run on Tomcat Server within Eclipse
- Eclipse RCP - how do all the jars / bundles interact?
- eclipse IDE search in open file (triggered by Ctrl-F) triggers an intrusive popup
- Configure Eclipse CDT to generate makefiles with relative sources paths
- eclipse editor, how to work with text editor (theme) when working with a specific perspective?
- Boost (header only) integration with Cocos2d-X Android project
- Programmatically change file associations in Eclipse
- How to run Clojure-tests in Eclipse?
- CardsUI for Android setScrollListener