How to change JDK version for an Eclipse project










59















I need to write a project that's only compatible with Java 1.5. I have Java 1.6 installed. Is there some form of backwards compatibility to get Eclipse to compile with 1.5?



Do I have to install Java 1.5 to get it to show here? Or maybe there is another way?



Enter image description here.










share|improve this question




























    59















    I need to write a project that's only compatible with Java 1.5. I have Java 1.6 installed. Is there some form of backwards compatibility to get Eclipse to compile with 1.5?



    Do I have to install Java 1.5 to get it to show here? Or maybe there is another way?



    Enter image description here.










    share|improve this question


























      59












      59








      59


      14






      I need to write a project that's only compatible with Java 1.5. I have Java 1.6 installed. Is there some form of backwards compatibility to get Eclipse to compile with 1.5?



      Do I have to install Java 1.5 to get it to show here? Or maybe there is another way?



      Enter image description here.










      share|improve this question
















      I need to write a project that's only compatible with Java 1.5. I have Java 1.6 installed. Is there some form of backwards compatibility to get Eclipse to compile with 1.5?



      Do I have to install Java 1.5 to get it to show here? Or maybe there is another way?



      Enter image description here.







      java eclipse jar






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 20 '17 at 23:20









      Peter Mortensen

      13.7k1986113




      13.7k1986113










      asked Sep 25 '12 at 17:58









      DavidDavid

      8,3172280134




      8,3172280134






















          9 Answers
          9






          active

          oldest

          votes


















          41














          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.






          share|improve this answer




















          • 1





            Maybe the question was misunderstood... do I need to install JDK 1.5? If I follow your instructions I still have to browse for the 1.5 folder. Is it fine to have two JDKs installed alongside?

            – David
            Sep 25 '12 at 18:03











          • Unless you have restriction that your files should be compiled for version 1.5 (or) any libraries don't support 1.6, it is not required have 1.5.

            – kosa
            Sep 25 '12 at 18:05











          • Even though you want to just 1.5 compiler project, you can achieve it by changing compiler settings in eclipse.

            – kosa
            Sep 25 '12 at 18:08






          • 1





            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.

            – davidfmatheson
            Sep 25 '12 at 18:20






          • 1





            @RomanC It is bytecode, but potentially with types that the older JRE doesn't recognize. Try my use case. You'll see it causes an error.

            – davidfmatheson
            Sep 25 '12 at 18:45


















          19














          Click on the Window tab in Eclipse, go to Preferences and when that window comes up, go to JavaInstalled JREsExecution Environment and choose JavaSE-1.5. You then have to go to Compiler and set the Compiler compliance level.



          Changing JRE



          Enter image description here






          share|improve this answer

























          • Thanks, close to getting to the answer, compliance level was what I was looking for.

            – David
            Sep 25 '12 at 18:14


















          13














          Right click project -> Properties -> Java Build Path -> select JRE System Library click Edit and select JDK or JRE after then click Java Compiler and select Compiler compliance level to 1.8



          enter image description here



          enter image description here



          enter image description here






          share|improve this answer






























            2














            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.






            share|improve this answer
































              2














              See the page Set Up JDK in Eclipse. From the add button you can add a different version of the JDK...






              share|improve this answer
































                2














                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:



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



                Alt text http://www.standartux.fr/public/Java/Preferences.png






                share|improve this answer
































                  2














                  If you are using maven build tool then add the below properties to it and doing a maven update will solve the problem



                  <properties>
                  <maven.compiler.source>1.8</maven.compiler.source>
                  <maven.compiler.target>1.8</maven.compiler.target>
                  </properties>





                  share|improve this answer






























                    1














                    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:



                    enter image description here






                    share|improve this answer






























                      1














                      As I was facing this issue minutes ago, in case you are trying to open an existing project in an environment with a newer JDK, make sure you pdate the JDK version in Project Properties -> Project Facets -> Java.








                      share|improve this answer






















                        Your Answer






                        StackExchange.ifUsing("editor", function ()
                        StackExchange.using("externalEditor", function ()
                        StackExchange.using("snippets", function ()
                        StackExchange.snippets.init();
                        );
                        );
                        , "code-snippets");

                        StackExchange.ready(function()
                        var channelOptions =
                        tags: "".split(" "),
                        id: "1"
                        ;
                        initTagRenderer("".split(" "), "".split(" "), channelOptions);

                        StackExchange.using("externalEditor", function()
                        // Have to fire editor after snippets, if snippets enabled
                        if (StackExchange.settings.snippets.snippetsEnabled)
                        StackExchange.using("snippets", function()
                        createEditor();
                        );

                        else
                        createEditor();

                        );

                        function createEditor()
                        StackExchange.prepareEditor(
                        heartbeatType: 'answer',
                        autoActivateHeartbeat: false,
                        convertImagesToLinks: true,
                        noModals: true,
                        showLowRepImageUploadWarning: true,
                        reputationToPostImages: 10,
                        bindNavPrevention: true,
                        postfix: "",
                        imageUploader:
                        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                        allowUrls: true
                        ,
                        onDemand: true,
                        discardSelector: ".discard-answer"
                        ,immediatelyShowMarkdownHelp:true
                        );



                        );













                        draft saved

                        draft discarded


















                        StackExchange.ready(
                        function ()
                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f12588537%2fhow-to-change-jdk-version-for-an-eclipse-project%23new-answer', 'question_page');

                        );

                        Post as a guest















                        Required, but never shown

























                        9 Answers
                        9






                        active

                        oldest

                        votes








                        9 Answers
                        9






                        active

                        oldest

                        votes









                        active

                        oldest

                        votes






                        active

                        oldest

                        votes









                        41














                        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.






                        share|improve this answer




















                        • 1





                          Maybe the question was misunderstood... do I need to install JDK 1.5? If I follow your instructions I still have to browse for the 1.5 folder. Is it fine to have two JDKs installed alongside?

                          – David
                          Sep 25 '12 at 18:03











                        • Unless you have restriction that your files should be compiled for version 1.5 (or) any libraries don't support 1.6, it is not required have 1.5.

                          – kosa
                          Sep 25 '12 at 18:05











                        • Even though you want to just 1.5 compiler project, you can achieve it by changing compiler settings in eclipse.

                          – kosa
                          Sep 25 '12 at 18:08






                        • 1





                          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.

                          – davidfmatheson
                          Sep 25 '12 at 18:20






                        • 1





                          @RomanC It is bytecode, but potentially with types that the older JRE doesn't recognize. Try my use case. You'll see it causes an error.

                          – davidfmatheson
                          Sep 25 '12 at 18:45















                        41














                        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.






                        share|improve this answer




















                        • 1





                          Maybe the question was misunderstood... do I need to install JDK 1.5? If I follow your instructions I still have to browse for the 1.5 folder. Is it fine to have two JDKs installed alongside?

                          – David
                          Sep 25 '12 at 18:03











                        • Unless you have restriction that your files should be compiled for version 1.5 (or) any libraries don't support 1.6, it is not required have 1.5.

                          – kosa
                          Sep 25 '12 at 18:05











                        • Even though you want to just 1.5 compiler project, you can achieve it by changing compiler settings in eclipse.

                          – kosa
                          Sep 25 '12 at 18:08






                        • 1





                          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.

                          – davidfmatheson
                          Sep 25 '12 at 18:20






                        • 1





                          @RomanC It is bytecode, but potentially with types that the older JRE doesn't recognize. Try my use case. You'll see it causes an error.

                          – davidfmatheson
                          Sep 25 '12 at 18:45













                        41












                        41








                        41







                        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.






                        share|improve this answer















                        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.







                        share|improve this answer














                        share|improve this answer



                        share|improve this answer








                        edited Jan 20 '17 at 23:21









                        Peter Mortensen

                        13.7k1986113




                        13.7k1986113










                        answered Sep 25 '12 at 17:59









                        kosakosa

                        58.9k9108145




                        58.9k9108145







                        • 1





                          Maybe the question was misunderstood... do I need to install JDK 1.5? If I follow your instructions I still have to browse for the 1.5 folder. Is it fine to have two JDKs installed alongside?

                          – David
                          Sep 25 '12 at 18:03











                        • Unless you have restriction that your files should be compiled for version 1.5 (or) any libraries don't support 1.6, it is not required have 1.5.

                          – kosa
                          Sep 25 '12 at 18:05











                        • Even though you want to just 1.5 compiler project, you can achieve it by changing compiler settings in eclipse.

                          – kosa
                          Sep 25 '12 at 18:08






                        • 1





                          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.

                          – davidfmatheson
                          Sep 25 '12 at 18:20






                        • 1





                          @RomanC It is bytecode, but potentially with types that the older JRE doesn't recognize. Try my use case. You'll see it causes an error.

                          – davidfmatheson
                          Sep 25 '12 at 18:45












                        • 1





                          Maybe the question was misunderstood... do I need to install JDK 1.5? If I follow your instructions I still have to browse for the 1.5 folder. Is it fine to have two JDKs installed alongside?

                          – David
                          Sep 25 '12 at 18:03











                        • Unless you have restriction that your files should be compiled for version 1.5 (or) any libraries don't support 1.6, it is not required have 1.5.

                          – kosa
                          Sep 25 '12 at 18:05











                        • Even though you want to just 1.5 compiler project, you can achieve it by changing compiler settings in eclipse.

                          – kosa
                          Sep 25 '12 at 18:08






                        • 1





                          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.

                          – davidfmatheson
                          Sep 25 '12 at 18:20






                        • 1





                          @RomanC It is bytecode, but potentially with types that the older JRE doesn't recognize. Try my use case. You'll see it causes an error.

                          – davidfmatheson
                          Sep 25 '12 at 18:45







                        1




                        1





                        Maybe the question was misunderstood... do I need to install JDK 1.5? If I follow your instructions I still have to browse for the 1.5 folder. Is it fine to have two JDKs installed alongside?

                        – David
                        Sep 25 '12 at 18:03





                        Maybe the question was misunderstood... do I need to install JDK 1.5? If I follow your instructions I still have to browse for the 1.5 folder. Is it fine to have two JDKs installed alongside?

                        – David
                        Sep 25 '12 at 18:03













                        Unless you have restriction that your files should be compiled for version 1.5 (or) any libraries don't support 1.6, it is not required have 1.5.

                        – kosa
                        Sep 25 '12 at 18:05





                        Unless you have restriction that your files should be compiled for version 1.5 (or) any libraries don't support 1.6, it is not required have 1.5.

                        – kosa
                        Sep 25 '12 at 18:05













                        Even though you want to just 1.5 compiler project, you can achieve it by changing compiler settings in eclipse.

                        – kosa
                        Sep 25 '12 at 18:08





                        Even though you want to just 1.5 compiler project, you can achieve it by changing compiler settings in eclipse.

                        – kosa
                        Sep 25 '12 at 18:08




                        1




                        1





                        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.

                        – davidfmatheson
                        Sep 25 '12 at 18:20





                        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.

                        – davidfmatheson
                        Sep 25 '12 at 18:20




                        1




                        1





                        @RomanC It is bytecode, but potentially with types that the older JRE doesn't recognize. Try my use case. You'll see it causes an error.

                        – davidfmatheson
                        Sep 25 '12 at 18:45





                        @RomanC It is bytecode, but potentially with types that the older JRE doesn't recognize. Try my use case. You'll see it causes an error.

                        – davidfmatheson
                        Sep 25 '12 at 18:45













                        19














                        Click on the Window tab in Eclipse, go to Preferences and when that window comes up, go to JavaInstalled JREsExecution Environment and choose JavaSE-1.5. You then have to go to Compiler and set the Compiler compliance level.



                        Changing JRE



                        Enter image description here






                        share|improve this answer

























                        • Thanks, close to getting to the answer, compliance level was what I was looking for.

                          – David
                          Sep 25 '12 at 18:14















                        19














                        Click on the Window tab in Eclipse, go to Preferences and when that window comes up, go to JavaInstalled JREsExecution Environment and choose JavaSE-1.5. You then have to go to Compiler and set the Compiler compliance level.



                        Changing JRE



                        Enter image description here






                        share|improve this answer

























                        • Thanks, close to getting to the answer, compliance level was what I was looking for.

                          – David
                          Sep 25 '12 at 18:14













                        19












                        19








                        19







                        Click on the Window tab in Eclipse, go to Preferences and when that window comes up, go to JavaInstalled JREsExecution Environment and choose JavaSE-1.5. You then have to go to Compiler and set the Compiler compliance level.



                        Changing JRE



                        Enter image description here






                        share|improve this answer















                        Click on the Window tab in Eclipse, go to Preferences and when that window comes up, go to JavaInstalled JREsExecution Environment and choose JavaSE-1.5. You then have to go to Compiler and set the Compiler compliance level.



                        Changing JRE



                        Enter image description here







                        share|improve this answer














                        share|improve this answer



                        share|improve this answer








                        edited Jan 20 '17 at 23:24









                        Peter Mortensen

                        13.7k1986113




                        13.7k1986113










                        answered Sep 25 '12 at 18:05









                        Ronald91Ronald91

                        1,35811222




                        1,35811222












                        • Thanks, close to getting to the answer, compliance level was what I was looking for.

                          – David
                          Sep 25 '12 at 18:14

















                        • Thanks, close to getting to the answer, compliance level was what I was looking for.

                          – David
                          Sep 25 '12 at 18:14
















                        Thanks, close to getting to the answer, compliance level was what I was looking for.

                        – David
                        Sep 25 '12 at 18:14





                        Thanks, close to getting to the answer, compliance level was what I was looking for.

                        – David
                        Sep 25 '12 at 18:14











                        13














                        Right click project -> Properties -> Java Build Path -> select JRE System Library click Edit and select JDK or JRE after then click Java Compiler and select Compiler compliance level to 1.8



                        enter image description here



                        enter image description here



                        enter image description here






                        share|improve this answer



























                          13














                          Right click project -> Properties -> Java Build Path -> select JRE System Library click Edit and select JDK or JRE after then click Java Compiler and select Compiler compliance level to 1.8



                          enter image description here



                          enter image description here



                          enter image description here






                          share|improve this answer

























                            13












                            13








                            13







                            Right click project -> Properties -> Java Build Path -> select JRE System Library click Edit and select JDK or JRE after then click Java Compiler and select Compiler compliance level to 1.8



                            enter image description here



                            enter image description here



                            enter image description here






                            share|improve this answer













                            Right click project -> Properties -> Java Build Path -> select JRE System Library click Edit and select JDK or JRE after then click Java Compiler and select Compiler compliance level to 1.8



                            enter image description here



                            enter image description here



                            enter image description here







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Sep 4 '15 at 15:20









                            ethemsulanethemsulan

                            1,7912019




                            1,7912019





















                                2














                                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.






                                share|improve this answer





























                                  2














                                  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.






                                  share|improve this answer



























                                    2












                                    2








                                    2







                                    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.






                                    share|improve this answer















                                    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.







                                    share|improve this answer














                                    share|improve this answer



                                    share|improve this answer








                                    edited Aug 26 '15 at 2:04

























                                    answered Aug 25 '15 at 23:02









                                    imvpimvp

                                    105110




                                    105110





















                                        2














                                        See the page Set Up JDK in Eclipse. From the add button you can add a different version of the JDK...






                                        share|improve this answer





























                                          2














                                          See the page Set Up JDK in Eclipse. From the add button you can add a different version of the JDK...






                                          share|improve this answer



























                                            2












                                            2








                                            2







                                            See the page Set Up JDK in Eclipse. From the add button you can add a different version of the JDK...






                                            share|improve this answer















                                            See the page Set Up JDK in Eclipse. From the add button you can add a different version of the JDK...







                                            share|improve this answer














                                            share|improve this answer



                                            share|improve this answer








                                            edited Jan 20 '17 at 23:22









                                            Peter Mortensen

                                            13.7k1986113




                                            13.7k1986113










                                            answered Sep 25 '12 at 18:02









                                            BurebistaRulerBurebistaRuler

                                            2,405103656




                                            2,405103656





















                                                2














                                                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:



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



                                                Alt text http://www.standartux.fr/public/Java/Preferences.png






                                                share|improve this answer





























                                                  2














                                                  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:



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



                                                  Alt text http://www.standartux.fr/public/Java/Preferences.png






                                                  share|improve this answer



























                                                    2












                                                    2








                                                    2







                                                    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:



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



                                                    Alt text http://www.standartux.fr/public/Java/Preferences.png






                                                    share|improve this answer















                                                    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:



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



                                                    Alt text http://www.standartux.fr/public/Java/Preferences.png







                                                    share|improve this answer














                                                    share|improve this answer



                                                    share|improve this answer








                                                    edited May 23 '17 at 12:10









                                                    Community

                                                    11




                                                    11










                                                    answered Dec 12 '13 at 12:39









                                                    Sujith PSSujith PS

                                                    3,91832553




                                                    3,91832553





















                                                        2














                                                        If you are using maven build tool then add the below properties to it and doing a maven update will solve the problem



                                                        <properties>
                                                        <maven.compiler.source>1.8</maven.compiler.source>
                                                        <maven.compiler.target>1.8</maven.compiler.target>
                                                        </properties>





                                                        share|improve this answer



























                                                          2














                                                          If you are using maven build tool then add the below properties to it and doing a maven update will solve the problem



                                                          <properties>
                                                          <maven.compiler.source>1.8</maven.compiler.source>
                                                          <maven.compiler.target>1.8</maven.compiler.target>
                                                          </properties>





                                                          share|improve this answer

























                                                            2












                                                            2








                                                            2







                                                            If you are using maven build tool then add the below properties to it and doing a maven update will solve the problem



                                                            <properties>
                                                            <maven.compiler.source>1.8</maven.compiler.source>
                                                            <maven.compiler.target>1.8</maven.compiler.target>
                                                            </properties>





                                                            share|improve this answer













                                                            If you are using maven build tool then add the below properties to it and doing a maven update will solve the problem



                                                            <properties>
                                                            <maven.compiler.source>1.8</maven.compiler.source>
                                                            <maven.compiler.target>1.8</maven.compiler.target>
                                                            </properties>






                                                            share|improve this answer












                                                            share|improve this answer



                                                            share|improve this answer










                                                            answered Oct 5 '18 at 15:19









                                                            Vishakh RameshanVishakh Rameshan

                                                            795




                                                            795





















                                                                1














                                                                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:



                                                                enter image description here






                                                                share|improve this answer



























                                                                  1














                                                                  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:



                                                                  enter image description here






                                                                  share|improve this answer

























                                                                    1












                                                                    1








                                                                    1







                                                                    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:



                                                                    enter image description here






                                                                    share|improve this answer













                                                                    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:



                                                                    enter image description here







                                                                    share|improve this answer












                                                                    share|improve this answer



                                                                    share|improve this answer










                                                                    answered Sep 25 '12 at 18:03









                                                                    Boiler BillBoiler Bill

                                                                    1,32511727




                                                                    1,32511727





















                                                                        1














                                                                        As I was facing this issue minutes ago, in case you are trying to open an existing project in an environment with a newer JDK, make sure you pdate the JDK version in Project Properties -> Project Facets -> Java.








                                                                        share|improve this answer



























                                                                          1














                                                                          As I was facing this issue minutes ago, in case you are trying to open an existing project in an environment with a newer JDK, make sure you pdate the JDK version in Project Properties -> Project Facets -> Java.








                                                                          share|improve this answer

























                                                                            1












                                                                            1








                                                                            1







                                                                            As I was facing this issue minutes ago, in case you are trying to open an existing project in an environment with a newer JDK, make sure you pdate the JDK version in Project Properties -> Project Facets -> Java.








                                                                            share|improve this answer













                                                                            As I was facing this issue minutes ago, in case you are trying to open an existing project in an environment with a newer JDK, make sure you pdate the JDK version in Project Properties -> Project Facets -> Java.









                                                                            share|improve this answer












                                                                            share|improve this answer



                                                                            share|improve this answer










                                                                            answered Dec 17 '15 at 13:06









                                                                            YarimiYarimi

                                                                            330517




                                                                            330517



























                                                                                draft saved

                                                                                draft discarded
















































                                                                                Thanks for contributing an answer to Stack Overflow!


                                                                                • Please be sure to answer the question. Provide details and share your research!

                                                                                But avoid


                                                                                • Asking for help, clarification, or responding to other answers.

                                                                                • Making statements based on opinion; back them up with references or personal experience.

                                                                                To learn more, see our tips on writing great answers.




                                                                                draft saved


                                                                                draft discarded














                                                                                StackExchange.ready(
                                                                                function ()
                                                                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f12588537%2fhow-to-change-jdk-version-for-an-eclipse-project%23new-answer', 'question_page');

                                                                                );

                                                                                Post as a guest















                                                                                Required, but never shown





















































                                                                                Required, but never shown














                                                                                Required, but never shown












                                                                                Required, but never shown







                                                                                Required, but never shown

































                                                                                Required, but never shown














                                                                                Required, but never shown












                                                                                Required, but never shown







                                                                                Required, but never shown







                                                                                Popular posts from this blog

                                                                                Use pre created SQLite database for Android project in kotlin

                                                                                Darth Vader #20

                                                                                Ondo