Can we install two versions of Java JDK in windows The Next CEO of Stack OverflowA program made with Java 8 can be run on Java 7?How can I concatenate two arrays in Java?Eclipse - no Java (JRE) / (JDK) … no virtual machineHow to set java_home on Windows 7?Android SDK installation doesn't find JDKFailed to load the JNI shared Library (JDK)Can't start Eclipse - Java was started but returned exit code=13Dealing with “Xerces hell” in Java/Maven?Installed Java 7 on Mac OS X but Terminal is still using version 6Installing Java 7 on UbuntuHow do I tell Gradle to use specific JDK version?

Can this note be analyzed as a non-chord tone?

Yu-Gi-Oh cards in Python 3

What would be the main consequences for a country leaving the WTO?

Ising model simulation

Why is information "lost" when it got into a black hole?

Is it convenient to ask the journal's editor for two additional days to complete a review?

TikZ: How to fill area with a special pattern?

How do I fit a non linear curve?

Computationally populating tables with probability data

Does higher Oxidation/ reduction potential translate to higher energy storage in battery?

Is a distribution that is normal, but highly skewed, considered Gaussian?

Physiological effects of huge anime eyes

What CSS properties can the br tag have?

How to use ReplaceAll on an expression that contains a rule

Why is the US ranked as #45 in Press Freedom ratings, despite its extremely permissive free speech laws?

Defamation due to breach of confidentiality

IC has pull-down resistors on SMBus lines?

What steps are necessary to read a Modern SSD in Medieval Europe?

Reshaping json / reparing json inside shell script (remove trailing comma)

Can I board the first leg of the flight without having final country's visa?

Do scriptures give a method to recognize a truly self-realized person/jivanmukta?

What are the unusually-enlarged wing sections on this P-38 Lightning?

Why do we say 'Un seul M' and not 'Une seule M' even though M is a "consonne"

Why did early computer designers eschew integers?



Can we install two versions of Java JDK in windows



The Next CEO of Stack OverflowA program made with Java 8 can be run on Java 7?How can I concatenate two arrays in Java?Eclipse - no Java (JRE) / (JDK) … no virtual machineHow to set java_home on Windows 7?Android SDK installation doesn't find JDKFailed to load the JNI shared Library (JDK)Can't start Eclipse - Java was started but returned exit code=13Dealing with “Xerces hell” in Java/Maven?Installed Java 7 on Mac OS X but Terminal is still using version 6Installing Java 7 on UbuntuHow do I tell Gradle to use specific JDK version?










6















I have created an executable jar developed on java version 8.Jar was opening on double click. But as the oracle apps support only Java 6, I had to install JRE6 but then after JRE6 installation, my executable jar is not opening.



I have set the JDK 8 bin path in Path environment variables. Please suggest a solution for this problem. Why is the jar not opening after two JAVA versions in the system?



JAR should open even if two versions 6 and 8 of java are installed in the system.










share|improve this question









New contributor




JTechseeker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 2





    Can we install two versions of Java JDK in windows Yes. Why is the jar not opening after two JAVA versions in system? Because Java 6 can't run Java 8 compiled code, you should be getting an error, and that error should have led you to the solution (recompile your application with Java 6, because Java 8 can run Java 6 compiled code).

    – Elliott Frisch
    1 hour ago











  • Hi Elliott :), Thank you for responding. My application will support only Java 8 and above.Do you have another suggestion?

    – JTechseeker
    1 hour ago











  • If your application will only support Java 8 and above, why have you installed Java 6?

    – Elliott Frisch
    1 hour ago











  • @JTechseeker set default path of your JRE to 6

    – Mustahsan
    1 hour ago











  • @ElliottFrisch : Hi Elliot, We are using oracle ERP instance which require java 6 for opening forms.

    – JTechseeker
    1 hour ago
















6















I have created an executable jar developed on java version 8.Jar was opening on double click. But as the oracle apps support only Java 6, I had to install JRE6 but then after JRE6 installation, my executable jar is not opening.



I have set the JDK 8 bin path in Path environment variables. Please suggest a solution for this problem. Why is the jar not opening after two JAVA versions in the system?



JAR should open even if two versions 6 and 8 of java are installed in the system.










share|improve this question









New contributor




JTechseeker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 2





    Can we install two versions of Java JDK in windows Yes. Why is the jar not opening after two JAVA versions in system? Because Java 6 can't run Java 8 compiled code, you should be getting an error, and that error should have led you to the solution (recompile your application with Java 6, because Java 8 can run Java 6 compiled code).

    – Elliott Frisch
    1 hour ago











  • Hi Elliott :), Thank you for responding. My application will support only Java 8 and above.Do you have another suggestion?

    – JTechseeker
    1 hour ago











  • If your application will only support Java 8 and above, why have you installed Java 6?

    – Elliott Frisch
    1 hour ago











  • @JTechseeker set default path of your JRE to 6

    – Mustahsan
    1 hour ago











  • @ElliottFrisch : Hi Elliot, We are using oracle ERP instance which require java 6 for opening forms.

    – JTechseeker
    1 hour ago














6












6








6








I have created an executable jar developed on java version 8.Jar was opening on double click. But as the oracle apps support only Java 6, I had to install JRE6 but then after JRE6 installation, my executable jar is not opening.



I have set the JDK 8 bin path in Path environment variables. Please suggest a solution for this problem. Why is the jar not opening after two JAVA versions in the system?



JAR should open even if two versions 6 and 8 of java are installed in the system.










share|improve this question









New contributor




JTechseeker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I have created an executable jar developed on java version 8.Jar was opening on double click. But as the oracle apps support only Java 6, I had to install JRE6 but then after JRE6 installation, my executable jar is not opening.



I have set the JDK 8 bin path in Path environment variables. Please suggest a solution for this problem. Why is the jar not opening after two JAVA versions in the system?



JAR should open even if two versions 6 and 8 of java are installed in the system.







java






share|improve this question









New contributor




JTechseeker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




JTechseeker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 45 mins ago









Mr. Semicolon

6151422




6151422






New contributor




JTechseeker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 1 hour ago









JTechseekerJTechseeker

314




314




New contributor




JTechseeker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





JTechseeker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






JTechseeker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







  • 2





    Can we install two versions of Java JDK in windows Yes. Why is the jar not opening after two JAVA versions in system? Because Java 6 can't run Java 8 compiled code, you should be getting an error, and that error should have led you to the solution (recompile your application with Java 6, because Java 8 can run Java 6 compiled code).

    – Elliott Frisch
    1 hour ago











  • Hi Elliott :), Thank you for responding. My application will support only Java 8 and above.Do you have another suggestion?

    – JTechseeker
    1 hour ago











  • If your application will only support Java 8 and above, why have you installed Java 6?

    – Elliott Frisch
    1 hour ago











  • @JTechseeker set default path of your JRE to 6

    – Mustahsan
    1 hour ago











  • @ElliottFrisch : Hi Elliot, We are using oracle ERP instance which require java 6 for opening forms.

    – JTechseeker
    1 hour ago













  • 2





    Can we install two versions of Java JDK in windows Yes. Why is the jar not opening after two JAVA versions in system? Because Java 6 can't run Java 8 compiled code, you should be getting an error, and that error should have led you to the solution (recompile your application with Java 6, because Java 8 can run Java 6 compiled code).

    – Elliott Frisch
    1 hour ago











  • Hi Elliott :), Thank you for responding. My application will support only Java 8 and above.Do you have another suggestion?

    – JTechseeker
    1 hour ago











  • If your application will only support Java 8 and above, why have you installed Java 6?

    – Elliott Frisch
    1 hour ago











  • @JTechseeker set default path of your JRE to 6

    – Mustahsan
    1 hour ago











  • @ElliottFrisch : Hi Elliot, We are using oracle ERP instance which require java 6 for opening forms.

    – JTechseeker
    1 hour ago








2




2





Can we install two versions of Java JDK in windows Yes. Why is the jar not opening after two JAVA versions in system? Because Java 6 can't run Java 8 compiled code, you should be getting an error, and that error should have led you to the solution (recompile your application with Java 6, because Java 8 can run Java 6 compiled code).

– Elliott Frisch
1 hour ago





Can we install two versions of Java JDK in windows Yes. Why is the jar not opening after two JAVA versions in system? Because Java 6 can't run Java 8 compiled code, you should be getting an error, and that error should have led you to the solution (recompile your application with Java 6, because Java 8 can run Java 6 compiled code).

– Elliott Frisch
1 hour ago













Hi Elliott :), Thank you for responding. My application will support only Java 8 and above.Do you have another suggestion?

– JTechseeker
1 hour ago





Hi Elliott :), Thank you for responding. My application will support only Java 8 and above.Do you have another suggestion?

– JTechseeker
1 hour ago













If your application will only support Java 8 and above, why have you installed Java 6?

– Elliott Frisch
1 hour ago





If your application will only support Java 8 and above, why have you installed Java 6?

– Elliott Frisch
1 hour ago













@JTechseeker set default path of your JRE to 6

– Mustahsan
1 hour ago





@JTechseeker set default path of your JRE to 6

– Mustahsan
1 hour ago













@ElliottFrisch : Hi Elliot, We are using oracle ERP instance which require java 6 for opening forms.

– JTechseeker
1 hour ago






@ElliottFrisch : Hi Elliot, We are using oracle ERP instance which require java 6 for opening forms.

– JTechseeker
1 hour ago













2 Answers
2






active

oldest

votes


















2














You are facing Backward Compatibility problem,backwards compatibility means that you can run Java 6 program on Java 8 runtime, not the other way around.




You can Run Lower configuration on Higher Configuration not Vice-Versa




There are several reasons for that:



  1. Bytecode is versioned and JVM checks if it supports the version it
    finds in .class files.

  2. Some language constructs cannot be expressed in previous versions of
    bytecode.

  3. There are new classes and methods in newer JRE's which won't work
    with older ones.

If you really, really want (tip: you don't), you can force the compiler to treat the source as one version of Java and emit bytecode for another, using something like this:



javac -source 1.8 -target 1.6 MyClass.java


Source: A program made with Java 8 can be run on Java 7?






share|improve this answer
































    0















    In the short term,

    the answer is yes. Since both JDK files are downloaded as jar fils it will ok to download both jar files. The reason to not opening after two java versions is as @Elliott said: "in the system is Java 6 can't run Java 8 compiled code, you should be getting an error." That's exactly true but the problem is how to use multiple versions of JDK in a single machine.




    Then we have to move on to long term,

    The tricky thing is to manage these multiple JDKs and IDEs. It’s a piece of cake if I just use Eclipse for compiling my code because the IDE allows me to configure multiple versions of Java runtime. Unfortunately (or fortunately), I have to use the command line/shell to build my code. So, it is important that I have the right version of JDK present in the PATH and other related environment variables (such as JAVA_HOME).



    Manually modifying the environment variables every time I want to switch between JDKs, isn’t a happy task. But, thanks to Windows Powershell, I’m able to write a script that can do the heavy lifting for me.



    Basically, what you want to achieve is to set the PATH variable to add the Java bin folder and set the JAVA_HOME environment variable and then launch the correct Eclipse IDE. And, I want to do this with a single command. Let’s do it.



    1. Open a Windows Powershell.

    2. I prefer writing custom Windows scripts in my profile file so that it is available to run whenever I open the shell. To edit the profile, run this command: notepad.exe $profile - the $profile is a special variable that points to your profile file.

    3. Write the below script in the profile file and save it.


    function myIDE $env:Path = “C:vraajavajdk7bin;” $env:JAVA_HOME = “C:vraajavajdk7” C:vraaideeclipseeclipse set-location C:vraaworkspacemyproject play




    function officeIDE
    $env:Path = "C:vraajavajdk6bin;"
    $env:JAVA_HOME = "C:vraajavajdk6"
    C:officeeclipseeclipse



    1. Close and restart the Powershell.

    2. Now you can issue the command myIDE which will set the proper PATH and environment variables and then launch the Eclipse IDE.

    As you can see, there are two functions with different configurations. Just call the function name that you want to launch from the Powershell command line (myIDE).



    If any issue please put a comment below!






    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
      );



      );






      JTechseeker is a new contributor. Be nice, and check out our Code of Conduct.









      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55448416%2fcan-we-install-two-versions-of-java-jdk-in-windows%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









      2














      You are facing Backward Compatibility problem,backwards compatibility means that you can run Java 6 program on Java 8 runtime, not the other way around.




      You can Run Lower configuration on Higher Configuration not Vice-Versa




      There are several reasons for that:



      1. Bytecode is versioned and JVM checks if it supports the version it
        finds in .class files.

      2. Some language constructs cannot be expressed in previous versions of
        bytecode.

      3. There are new classes and methods in newer JRE's which won't work
        with older ones.

      If you really, really want (tip: you don't), you can force the compiler to treat the source as one version of Java and emit bytecode for another, using something like this:



      javac -source 1.8 -target 1.6 MyClass.java


      Source: A program made with Java 8 can be run on Java 7?






      share|improve this answer





























        2














        You are facing Backward Compatibility problem,backwards compatibility means that you can run Java 6 program on Java 8 runtime, not the other way around.




        You can Run Lower configuration on Higher Configuration not Vice-Versa




        There are several reasons for that:



        1. Bytecode is versioned and JVM checks if it supports the version it
          finds in .class files.

        2. Some language constructs cannot be expressed in previous versions of
          bytecode.

        3. There are new classes and methods in newer JRE's which won't work
          with older ones.

        If you really, really want (tip: you don't), you can force the compiler to treat the source as one version of Java and emit bytecode for another, using something like this:



        javac -source 1.8 -target 1.6 MyClass.java


        Source: A program made with Java 8 can be run on Java 7?






        share|improve this answer



























          2












          2








          2







          You are facing Backward Compatibility problem,backwards compatibility means that you can run Java 6 program on Java 8 runtime, not the other way around.




          You can Run Lower configuration on Higher Configuration not Vice-Versa




          There are several reasons for that:



          1. Bytecode is versioned and JVM checks if it supports the version it
            finds in .class files.

          2. Some language constructs cannot be expressed in previous versions of
            bytecode.

          3. There are new classes and methods in newer JRE's which won't work
            with older ones.

          If you really, really want (tip: you don't), you can force the compiler to treat the source as one version of Java and emit bytecode for another, using something like this:



          javac -source 1.8 -target 1.6 MyClass.java


          Source: A program made with Java 8 can be run on Java 7?






          share|improve this answer















          You are facing Backward Compatibility problem,backwards compatibility means that you can run Java 6 program on Java 8 runtime, not the other way around.




          You can Run Lower configuration on Higher Configuration not Vice-Versa




          There are several reasons for that:



          1. Bytecode is versioned and JVM checks if it supports the version it
            finds in .class files.

          2. Some language constructs cannot be expressed in previous versions of
            bytecode.

          3. There are new classes and methods in newer JRE's which won't work
            with older ones.

          If you really, really want (tip: you don't), you can force the compiler to treat the source as one version of Java and emit bytecode for another, using something like this:



          javac -source 1.8 -target 1.6 MyClass.java


          Source: A program made with Java 8 can be run on Java 7?







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 43 mins ago

























          answered 1 hour ago









          Common ManCommon Man

          2,09721429




          2,09721429























              0















              In the short term,

              the answer is yes. Since both JDK files are downloaded as jar fils it will ok to download both jar files. The reason to not opening after two java versions is as @Elliott said: "in the system is Java 6 can't run Java 8 compiled code, you should be getting an error." That's exactly true but the problem is how to use multiple versions of JDK in a single machine.




              Then we have to move on to long term,

              The tricky thing is to manage these multiple JDKs and IDEs. It’s a piece of cake if I just use Eclipse for compiling my code because the IDE allows me to configure multiple versions of Java runtime. Unfortunately (or fortunately), I have to use the command line/shell to build my code. So, it is important that I have the right version of JDK present in the PATH and other related environment variables (such as JAVA_HOME).



              Manually modifying the environment variables every time I want to switch between JDKs, isn’t a happy task. But, thanks to Windows Powershell, I’m able to write a script that can do the heavy lifting for me.



              Basically, what you want to achieve is to set the PATH variable to add the Java bin folder and set the JAVA_HOME environment variable and then launch the correct Eclipse IDE. And, I want to do this with a single command. Let’s do it.



              1. Open a Windows Powershell.

              2. I prefer writing custom Windows scripts in my profile file so that it is available to run whenever I open the shell. To edit the profile, run this command: notepad.exe $profile - the $profile is a special variable that points to your profile file.

              3. Write the below script in the profile file and save it.


              function myIDE $env:Path = “C:vraajavajdk7bin;” $env:JAVA_HOME = “C:vraajavajdk7” C:vraaideeclipseeclipse set-location C:vraaworkspacemyproject play




              function officeIDE
              $env:Path = "C:vraajavajdk6bin;"
              $env:JAVA_HOME = "C:vraajavajdk6"
              C:officeeclipseeclipse



              1. Close and restart the Powershell.

              2. Now you can issue the command myIDE which will set the proper PATH and environment variables and then launch the Eclipse IDE.

              As you can see, there are two functions with different configurations. Just call the function name that you want to launch from the Powershell command line (myIDE).



              If any issue please put a comment below!






              share|improve this answer



























                0















                In the short term,

                the answer is yes. Since both JDK files are downloaded as jar fils it will ok to download both jar files. The reason to not opening after two java versions is as @Elliott said: "in the system is Java 6 can't run Java 8 compiled code, you should be getting an error." That's exactly true but the problem is how to use multiple versions of JDK in a single machine.




                Then we have to move on to long term,

                The tricky thing is to manage these multiple JDKs and IDEs. It’s a piece of cake if I just use Eclipse for compiling my code because the IDE allows me to configure multiple versions of Java runtime. Unfortunately (or fortunately), I have to use the command line/shell to build my code. So, it is important that I have the right version of JDK present in the PATH and other related environment variables (such as JAVA_HOME).



                Manually modifying the environment variables every time I want to switch between JDKs, isn’t a happy task. But, thanks to Windows Powershell, I’m able to write a script that can do the heavy lifting for me.



                Basically, what you want to achieve is to set the PATH variable to add the Java bin folder and set the JAVA_HOME environment variable and then launch the correct Eclipse IDE. And, I want to do this with a single command. Let’s do it.



                1. Open a Windows Powershell.

                2. I prefer writing custom Windows scripts in my profile file so that it is available to run whenever I open the shell. To edit the profile, run this command: notepad.exe $profile - the $profile is a special variable that points to your profile file.

                3. Write the below script in the profile file and save it.


                function myIDE $env:Path = “C:vraajavajdk7bin;” $env:JAVA_HOME = “C:vraajavajdk7” C:vraaideeclipseeclipse set-location C:vraaworkspacemyproject play




                function officeIDE
                $env:Path = "C:vraajavajdk6bin;"
                $env:JAVA_HOME = "C:vraajavajdk6"
                C:officeeclipseeclipse



                1. Close and restart the Powershell.

                2. Now you can issue the command myIDE which will set the proper PATH and environment variables and then launch the Eclipse IDE.

                As you can see, there are two functions with different configurations. Just call the function name that you want to launch from the Powershell command line (myIDE).



                If any issue please put a comment below!






                share|improve this answer

























                  0












                  0








                  0








                  In the short term,

                  the answer is yes. Since both JDK files are downloaded as jar fils it will ok to download both jar files. The reason to not opening after two java versions is as @Elliott said: "in the system is Java 6 can't run Java 8 compiled code, you should be getting an error." That's exactly true but the problem is how to use multiple versions of JDK in a single machine.




                  Then we have to move on to long term,

                  The tricky thing is to manage these multiple JDKs and IDEs. It’s a piece of cake if I just use Eclipse for compiling my code because the IDE allows me to configure multiple versions of Java runtime. Unfortunately (or fortunately), I have to use the command line/shell to build my code. So, it is important that I have the right version of JDK present in the PATH and other related environment variables (such as JAVA_HOME).



                  Manually modifying the environment variables every time I want to switch between JDKs, isn’t a happy task. But, thanks to Windows Powershell, I’m able to write a script that can do the heavy lifting for me.



                  Basically, what you want to achieve is to set the PATH variable to add the Java bin folder and set the JAVA_HOME environment variable and then launch the correct Eclipse IDE. And, I want to do this with a single command. Let’s do it.



                  1. Open a Windows Powershell.

                  2. I prefer writing custom Windows scripts in my profile file so that it is available to run whenever I open the shell. To edit the profile, run this command: notepad.exe $profile - the $profile is a special variable that points to your profile file.

                  3. Write the below script in the profile file and save it.


                  function myIDE $env:Path = “C:vraajavajdk7bin;” $env:JAVA_HOME = “C:vraajavajdk7” C:vraaideeclipseeclipse set-location C:vraaworkspacemyproject play




                  function officeIDE
                  $env:Path = "C:vraajavajdk6bin;"
                  $env:JAVA_HOME = "C:vraajavajdk6"
                  C:officeeclipseeclipse



                  1. Close and restart the Powershell.

                  2. Now you can issue the command myIDE which will set the proper PATH and environment variables and then launch the Eclipse IDE.

                  As you can see, there are two functions with different configurations. Just call the function name that you want to launch from the Powershell command line (myIDE).



                  If any issue please put a comment below!






                  share|improve this answer














                  In the short term,

                  the answer is yes. Since both JDK files are downloaded as jar fils it will ok to download both jar files. The reason to not opening after two java versions is as @Elliott said: "in the system is Java 6 can't run Java 8 compiled code, you should be getting an error." That's exactly true but the problem is how to use multiple versions of JDK in a single machine.




                  Then we have to move on to long term,

                  The tricky thing is to manage these multiple JDKs and IDEs. It’s a piece of cake if I just use Eclipse for compiling my code because the IDE allows me to configure multiple versions of Java runtime. Unfortunately (or fortunately), I have to use the command line/shell to build my code. So, it is important that I have the right version of JDK present in the PATH and other related environment variables (such as JAVA_HOME).



                  Manually modifying the environment variables every time I want to switch between JDKs, isn’t a happy task. But, thanks to Windows Powershell, I’m able to write a script that can do the heavy lifting for me.



                  Basically, what you want to achieve is to set the PATH variable to add the Java bin folder and set the JAVA_HOME environment variable and then launch the correct Eclipse IDE. And, I want to do this with a single command. Let’s do it.



                  1. Open a Windows Powershell.

                  2. I prefer writing custom Windows scripts in my profile file so that it is available to run whenever I open the shell. To edit the profile, run this command: notepad.exe $profile - the $profile is a special variable that points to your profile file.

                  3. Write the below script in the profile file and save it.


                  function myIDE $env:Path = “C:vraajavajdk7bin;” $env:JAVA_HOME = “C:vraajavajdk7” C:vraaideeclipseeclipse set-location C:vraaworkspacemyproject play




                  function officeIDE
                  $env:Path = "C:vraajavajdk6bin;"
                  $env:JAVA_HOME = "C:vraajavajdk6"
                  C:officeeclipseeclipse



                  1. Close and restart the Powershell.

                  2. Now you can issue the command myIDE which will set the proper PATH and environment variables and then launch the Eclipse IDE.

                  As you can see, there are two functions with different configurations. Just call the function name that you want to launch from the Powershell command line (myIDE).



                  If any issue please put a comment below!







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 1 hour ago









                  Mr. SemicolonMr. Semicolon

                  6151422




                  6151422




















                      JTechseeker is a new contributor. Be nice, and check out our Code of Conduct.









                      draft saved

                      draft discarded


















                      JTechseeker is a new contributor. Be nice, and check out our Code of Conduct.












                      JTechseeker is a new contributor. Be nice, and check out our Code of Conduct.











                      JTechseeker is a new contributor. Be nice, and check out our Code of Conduct.














                      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%2f55448416%2fcan-we-install-two-versions-of-java-jdk-in-windows%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

                      Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                      Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                      Tom Holland Mục lục Đầu đời và giáo dục | Sự nghiệp | Cuộc sống cá nhân | Phim tham gia | Giải thưởng và đề cử | Chú thích | Liên kết ngoài | Trình đơn chuyển hướngProfile“Person Details for Thomas Stanley Holland, "England and Wales Birth Registration Index, 1837-2008" — FamilySearch.org”"Meet Tom Holland... the 16-year-old star of The Impossible""Schoolboy actor Tom Holland finds himself in Oscar contention for role in tsunami drama"“Naomi Watts on the Prince William and Harry's reaction to her film about the late Princess Diana”lưu trữ"Holland and Pflueger Are West End's Two New 'Billy Elliots'""I'm so envious of my son, the movie star! British writer Dominic Holland's spent 20 years trying to crack Hollywood - but he's been beaten to it by a very unlikely rival"“Richard and Margaret Povey of Jersey, Channel Islands, UK: Information about Thomas Stanley Holland”"Tom Holland to play Billy Elliot""New Billy Elliot leaving the garage"Billy Elliot the Musical - Tom Holland - Billy"A Tale of four Billys: Tom Holland""The Feel Good Factor""Thames Christian College schoolboys join Myleene Klass for The Feelgood Factor""Government launches £600,000 arts bursaries pilot""BILLY's Chapman, Holland, Gardner & Jackson-Keen Visit Prime Minister""Elton John 'blown away' by Billy Elliot fifth birthday" (video with John's interview and fragments of Holland's performance)"First News interviews Arrietty's Tom Holland"“33rd Critics' Circle Film Awards winners”“National Board of Review Current Awards”Bản gốc"Ron Howard Whaling Tale 'In The Heart Of The Sea' Casts Tom Holland"“'Spider-Man' Finds Tom Holland to Star as New Web-Slinger”lưu trữ“Captain America: Civil War (2016)”“Film Review: ‘Captain America: Civil War’”lưu trữ“‘Captain America: Civil War’ review: Choose your own avenger”lưu trữ“The Lost City of Z reviews”“Sony Pictures and Marvel Studios Find Their 'Spider-Man' Star and Director”“‘Mary Magdalene’, ‘Current War’ & ‘Wind River’ Get 2017 Release Dates From Weinstein”“Lionsgate Unleashing Daisy Ridley & Tom Holland Starrer ‘Chaos Walking’ In Cannes”“PTA's 'Master' Leads Chicago Film Critics Nominations, UPDATED: Houston and Indiana Critics Nominations”“Nominaciones Goya 2013 Telecinco Cinema – ENG”“Jameson Empire Film Awards: Martin Freeman wins best actor for performance in The Hobbit”“34th Annual Young Artist Awards”Bản gốc“Teen Choice Awards 2016—Captain America: Civil War Leads Second Wave of Nominations”“BAFTA Film Award Nominations: ‘La La Land’ Leads Race”“Saturn Awards Nominations 2017: 'Rogue One,' 'Walking Dead' Lead”Tom HollandTom HollandTom HollandTom Hollandmedia.gettyimages.comWorldCat Identities300279794no20130442900000 0004 0355 42791085670554170004732cb16706349t(data)XX5557367