Upgrade to java 1.7 in eclipse on mac











up vote
1
down vote

favorite












I'm sort of a beginner with eclipse but I want to update the libraries or build path or whatever to java 1.7 from java 1.6 and I can't figure it out. I'm a computer science student at the university of washington and various TA's and students have tried to figure out this problem but it's stumped them all. I've installed java 1.7 from Oracle a few times already and the java section of system preferences says I have 1.7 but java -version in terminal says:




java version "1.6.0_41" Java(TM) SE Runtime Environment (build
1.6.0_41-b02-445-11M4107) Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01-445, mixed mode)




What's going on here? My mac is totally up to date on everything else










share|improve this question













migrated from stackoverflow.com Mar 12 '13 at 9:45


This question came from our site for professional and enthusiast programmers.



















    up vote
    1
    down vote

    favorite












    I'm sort of a beginner with eclipse but I want to update the libraries or build path or whatever to java 1.7 from java 1.6 and I can't figure it out. I'm a computer science student at the university of washington and various TA's and students have tried to figure out this problem but it's stumped them all. I've installed java 1.7 from Oracle a few times already and the java section of system preferences says I have 1.7 but java -version in terminal says:




    java version "1.6.0_41" Java(TM) SE Runtime Environment (build
    1.6.0_41-b02-445-11M4107) Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01-445, mixed mode)




    What's going on here? My mac is totally up to date on everything else










    share|improve this question













    migrated from stackoverflow.com Mar 12 '13 at 9:45


    This question came from our site for professional and enthusiast programmers.

















      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I'm sort of a beginner with eclipse but I want to update the libraries or build path or whatever to java 1.7 from java 1.6 and I can't figure it out. I'm a computer science student at the university of washington and various TA's and students have tried to figure out this problem but it's stumped them all. I've installed java 1.7 from Oracle a few times already and the java section of system preferences says I have 1.7 but java -version in terminal says:




      java version "1.6.0_41" Java(TM) SE Runtime Environment (build
      1.6.0_41-b02-445-11M4107) Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01-445, mixed mode)




      What's going on here? My mac is totally up to date on everything else










      share|improve this question













      I'm sort of a beginner with eclipse but I want to update the libraries or build path or whatever to java 1.7 from java 1.6 and I can't figure it out. I'm a computer science student at the university of washington and various TA's and students have tried to figure out this problem but it's stumped them all. I've installed java 1.7 from Oracle a few times already and the java section of system preferences says I have 1.7 but java -version in terminal says:




      java version "1.6.0_41" Java(TM) SE Runtime Environment (build
      1.6.0_41-b02-445-11M4107) Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01-445, mixed mode)




      What's going on here? My mac is totally up to date on everything else







      java eclipse jdk jre






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 12 '13 at 6:18







      user2159614











      migrated from stackoverflow.com Mar 12 '13 at 9:45


      This question came from our site for professional and enthusiast programmers.






      migrated from stackoverflow.com Mar 12 '13 at 9:45


      This question came from our site for professional and enthusiast programmers.
























          2 Answers
          2






          active

          oldest

          votes

















          up vote
          0
          down vote













          You need to add jdk 1.7 in the build path of your project in eclipse. Follow below steps.




          1. Right click on project

          2. Select buil path=>configure build path

          3. Select Java Build Path => Library

          4. Click Add Library=>JRE System Library =>Click next.

          5. Now select and add jdk1.7 installation location.

          6. Now click on Java Compiler => select Java compiler to 1.7.


          Note All version of eclipse does not include facet support for JDK 1.7 compiler. I will recommend you to download Eclipse Juno. Eclipse juno has inbuilt facet support for jdk 1.7 compiler.






          share|improve this answer





















          • This will help only in eclipse, but won't fix the problem on the Mac terminal, I guess.
            – Hannes M
            Mar 12 '13 at 6:39










          • Ok I am a windows user i don't know MAC. But i want to help you similar ways we do in windows. We set JAVA bin folder to system PATH variable. While doing so terminal will find java.exe from the folder specified in PATH variable.
            – Real
            Mar 12 '13 at 6:44


















          up vote
          0
          down vote













          it seems that you have both java versions installed in parallel



          First you can try this: http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-preferences.html




          • Goto Applications -> Utilities -> Java Preferences

          • To make JRE 7 the default version of Java, re-order the list by dragging Java SE 7 to the top of the list.


          If this doesn't help, your PATH variable is pointing to the wrong installation.



          Open you .profile file in your home directory (e.g., with open ~/.profile from our treminal) and check for a line like export PATH=/ and let it point to the directory you installed your oracle java 7 into.






          share|improve this answer





















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            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',
            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%2fsuperuser.com%2fquestions%2f564579%2fupgrade-to-java-1-7-in-eclipse-on-mac%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown
























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            You need to add jdk 1.7 in the build path of your project in eclipse. Follow below steps.




            1. Right click on project

            2. Select buil path=>configure build path

            3. Select Java Build Path => Library

            4. Click Add Library=>JRE System Library =>Click next.

            5. Now select and add jdk1.7 installation location.

            6. Now click on Java Compiler => select Java compiler to 1.7.


            Note All version of eclipse does not include facet support for JDK 1.7 compiler. I will recommend you to download Eclipse Juno. Eclipse juno has inbuilt facet support for jdk 1.7 compiler.






            share|improve this answer





















            • This will help only in eclipse, but won't fix the problem on the Mac terminal, I guess.
              – Hannes M
              Mar 12 '13 at 6:39










            • Ok I am a windows user i don't know MAC. But i want to help you similar ways we do in windows. We set JAVA bin folder to system PATH variable. While doing so terminal will find java.exe from the folder specified in PATH variable.
              – Real
              Mar 12 '13 at 6:44















            up vote
            0
            down vote













            You need to add jdk 1.7 in the build path of your project in eclipse. Follow below steps.




            1. Right click on project

            2. Select buil path=>configure build path

            3. Select Java Build Path => Library

            4. Click Add Library=>JRE System Library =>Click next.

            5. Now select and add jdk1.7 installation location.

            6. Now click on Java Compiler => select Java compiler to 1.7.


            Note All version of eclipse does not include facet support for JDK 1.7 compiler. I will recommend you to download Eclipse Juno. Eclipse juno has inbuilt facet support for jdk 1.7 compiler.






            share|improve this answer





















            • This will help only in eclipse, but won't fix the problem on the Mac terminal, I guess.
              – Hannes M
              Mar 12 '13 at 6:39










            • Ok I am a windows user i don't know MAC. But i want to help you similar ways we do in windows. We set JAVA bin folder to system PATH variable. While doing so terminal will find java.exe from the folder specified in PATH variable.
              – Real
              Mar 12 '13 at 6:44













            up vote
            0
            down vote










            up vote
            0
            down vote









            You need to add jdk 1.7 in the build path of your project in eclipse. Follow below steps.




            1. Right click on project

            2. Select buil path=>configure build path

            3. Select Java Build Path => Library

            4. Click Add Library=>JRE System Library =>Click next.

            5. Now select and add jdk1.7 installation location.

            6. Now click on Java Compiler => select Java compiler to 1.7.


            Note All version of eclipse does not include facet support for JDK 1.7 compiler. I will recommend you to download Eclipse Juno. Eclipse juno has inbuilt facet support for jdk 1.7 compiler.






            share|improve this answer












            You need to add jdk 1.7 in the build path of your project in eclipse. Follow below steps.




            1. Right click on project

            2. Select buil path=>configure build path

            3. Select Java Build Path => Library

            4. Click Add Library=>JRE System Library =>Click next.

            5. Now select and add jdk1.7 installation location.

            6. Now click on Java Compiler => select Java compiler to 1.7.


            Note All version of eclipse does not include facet support for JDK 1.7 compiler. I will recommend you to download Eclipse Juno. Eclipse juno has inbuilt facet support for jdk 1.7 compiler.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 12 '13 at 6:34









            Rais Alam

            1011




            1011












            • This will help only in eclipse, but won't fix the problem on the Mac terminal, I guess.
              – Hannes M
              Mar 12 '13 at 6:39










            • Ok I am a windows user i don't know MAC. But i want to help you similar ways we do in windows. We set JAVA bin folder to system PATH variable. While doing so terminal will find java.exe from the folder specified in PATH variable.
              – Real
              Mar 12 '13 at 6:44


















            • This will help only in eclipse, but won't fix the problem on the Mac terminal, I guess.
              – Hannes M
              Mar 12 '13 at 6:39










            • Ok I am a windows user i don't know MAC. But i want to help you similar ways we do in windows. We set JAVA bin folder to system PATH variable. While doing so terminal will find java.exe from the folder specified in PATH variable.
              – Real
              Mar 12 '13 at 6:44
















            This will help only in eclipse, but won't fix the problem on the Mac terminal, I guess.
            – Hannes M
            Mar 12 '13 at 6:39




            This will help only in eclipse, but won't fix the problem on the Mac terminal, I guess.
            – Hannes M
            Mar 12 '13 at 6:39












            Ok I am a windows user i don't know MAC. But i want to help you similar ways we do in windows. We set JAVA bin folder to system PATH variable. While doing so terminal will find java.exe from the folder specified in PATH variable.
            – Real
            Mar 12 '13 at 6:44




            Ok I am a windows user i don't know MAC. But i want to help you similar ways we do in windows. We set JAVA bin folder to system PATH variable. While doing so terminal will find java.exe from the folder specified in PATH variable.
            – Real
            Mar 12 '13 at 6:44












            up vote
            0
            down vote













            it seems that you have both java versions installed in parallel



            First you can try this: http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-preferences.html




            • Goto Applications -> Utilities -> Java Preferences

            • To make JRE 7 the default version of Java, re-order the list by dragging Java SE 7 to the top of the list.


            If this doesn't help, your PATH variable is pointing to the wrong installation.



            Open you .profile file in your home directory (e.g., with open ~/.profile from our treminal) and check for a line like export PATH=/ and let it point to the directory you installed your oracle java 7 into.






            share|improve this answer

























              up vote
              0
              down vote













              it seems that you have both java versions installed in parallel



              First you can try this: http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-preferences.html




              • Goto Applications -> Utilities -> Java Preferences

              • To make JRE 7 the default version of Java, re-order the list by dragging Java SE 7 to the top of the list.


              If this doesn't help, your PATH variable is pointing to the wrong installation.



              Open you .profile file in your home directory (e.g., with open ~/.profile from our treminal) and check for a line like export PATH=/ and let it point to the directory you installed your oracle java 7 into.






              share|improve this answer























                up vote
                0
                down vote










                up vote
                0
                down vote









                it seems that you have both java versions installed in parallel



                First you can try this: http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-preferences.html




                • Goto Applications -> Utilities -> Java Preferences

                • To make JRE 7 the default version of Java, re-order the list by dragging Java SE 7 to the top of the list.


                If this doesn't help, your PATH variable is pointing to the wrong installation.



                Open you .profile file in your home directory (e.g., with open ~/.profile from our treminal) and check for a line like export PATH=/ and let it point to the directory you installed your oracle java 7 into.






                share|improve this answer












                it seems that you have both java versions installed in parallel



                First you can try this: http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-preferences.html




                • Goto Applications -> Utilities -> Java Preferences

                • To make JRE 7 the default version of Java, re-order the list by dragging Java SE 7 to the top of the list.


                If this doesn't help, your PATH variable is pointing to the wrong installation.



                Open you .profile file in your home directory (e.g., with open ~/.profile from our treminal) and check for a line like export PATH=/ and let it point to the directory you installed your oracle java 7 into.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 12 '13 at 6:38







                Hannes M





































                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


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





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • 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%2fsuperuser.com%2fquestions%2f564579%2fupgrade-to-java-1-7-in-eclipse-on-mac%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

                    flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                    Mangá

                     ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕