How to change java jdk version? The Next CEO of Stack OverflowUnusal Error during Java EE SDK...
Do scriptures give a method to recognize a truly self-realized person/jivanmukta?
Where do students learn to solve polynomial equations these days?
Can Sneak Attack be used when hitting with an improvised weapon?
free fall ellipse or parabola?
From jafe to El-Guest
Expectation in a stochastic differential equation
Does Germany produce more waste than the US?
Help understanding this unsettling image of Titan, Epimetheus, and Saturn's rings?
Why is the US ranked as #45 in Press Freedom ratings, despite its extremely permissive free speech laws?
Airplane gently rocking its wings during whole flight
Is French Guiana a (hard) EU border?
Does higher Oxidation/ reduction potential translate to higher energy storage in battery?
Is fine stranded wire ok for main supply line?
Purpose of level-shifter with same in and out voltages
What day is it again?
Redefining symbol midway through a document
Is there a way to save my career from absolute disaster?
Why is information "lost" when it got into a black hole?
"Eavesdropping" vs "Listen in on"
Would a grinding machine be a simple and workable propulsion system for an interplanetary spacecraft?
How to get the last not-null value in an ordered column of a huge table?
What steps are necessary to read a Modern SSD in Medieval Europe?
If Nick Fury and Coulson already knew about aliens (Kree and Skrull) why did they wait until Thor's appearance to start making weapons?
Can I calculate next year's exemptions based on this year's refund/amount owed?
How to change java jdk version?
The Next CEO of Stack OverflowUnusal Error during Java EE SDK InstallUnknown issues installing jdkJava opens a new window when I start it from mingw/msysgit, how can I stop it?How to configure Chromium's Java plugin so it uses an existing JDK in the machinewhy update-alternatives --config java shows nothing?Java/JDK filesystem organization on OSX (Mavericks)Java 8 installation doesn't yield the correct javac versionOn Windows, why java -version return Error: opening registry key 'SoftwareJavaSoftJava Runtime Environment'?Error when trying to run simple java program in CMD or in EclipseUnable to find Java Interpreter on Windows 10
I want to install the new 11.0.02 java jdk. I tried to use this link:
first source
and afterwards this: second source
Now, using cmd, I run these two commands:
java -version==> the older version gets printed.
javac -versionthe new java jdk 11.0.02.
My question is: Why do they differ and how do I ensure that the latest version is the default?
java jdk
New contributor
user6394019 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
I want to install the new 11.0.02 java jdk. I tried to use this link:
first source
and afterwards this: second source
Now, using cmd, I run these two commands:
java -version==> the older version gets printed.
javac -versionthe new java jdk 11.0.02.
My question is: Why do they differ and how do I ensure that the latest version is the default?
java jdk
New contributor
user6394019 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once.
– Ramhound
1 hour ago
add a comment |
I want to install the new 11.0.02 java jdk. I tried to use this link:
first source
and afterwards this: second source
Now, using cmd, I run these two commands:
java -version==> the older version gets printed.
javac -versionthe new java jdk 11.0.02.
My question is: Why do they differ and how do I ensure that the latest version is the default?
java jdk
New contributor
user6394019 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I want to install the new 11.0.02 java jdk. I tried to use this link:
first source
and afterwards this: second source
Now, using cmd, I run these two commands:
java -version==> the older version gets printed.
javac -versionthe new java jdk 11.0.02.
My question is: Why do they differ and how do I ensure that the latest version is the default?
java jdk
java jdk
New contributor
user6394019 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user6394019 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 1 hour ago
fixer1234
19.1k144982
19.1k144982
New contributor
user6394019 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
user6394019user6394019
1011
1011
New contributor
user6394019 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user6394019 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
user6394019 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once.
– Ramhound
1 hour ago
add a comment |
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once.
– Ramhound
1 hour ago
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once.
– Ramhound
1 hour ago
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once.
– Ramhound
1 hour ago
add a comment |
2 Answers
2
active
oldest
votes
On Linux, if you have both (or more) versions installed, you can use the following command to select the active one:
sudo update-alternatives --config java
Oh. Then excuse me, I'm currently running a Linux variant. I'm going to leave this answer here for Linux users, but I cannot help you.
– zx485
1 hour ago
add a comment |
In my experience, if you've got a JRE installed, then install a JDK, the path for java.exe etc. will stay pointing at the JRE.
I hope I've answered your two questions, why are they different (because of the order of your path), and how to make the latest one the one that executes (by either installing the latest JRE or else fixing your path by hand) in the details below:
$ where java
C:Program Files (x86)Common FilesOracleJavajavapathjava.exe
C:Program Files (x86)Javajdk1.8.0_121binjava.exe
C:ProgramDataOracleJavajavapathjava.exe
$ which java [btw, which is a GNU tool, not built into Windows]
C:Program Files (x86)Common FilesOracleJavajavapathjava.EXE
$ path
PATH=C:Program Files (x86)Common FilesOracleJavajavapath;C:Program Files (x86)Javajdk1.8.0_121bin;
$ "C:Program Files (x86)Common FilesOracleJavajavapathjava.exe" -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) Client VM (build 25.201-b09, mixed mode)
$ "C:Program Files (x86)Javajdk1.8.0_121binjava.exe" -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) Client VM (build 25.121-b13, mixed mode, sharing)
(Pretending for the moment my JDK version of java was the newer one) I could update the JRE separately and it would probably fix things by putting the correct new version in Common Files for me, or I might just edit my path to put C:Program Files (x86)Javajdk1.8.0_121bin; in front of C:Program Files (x86)Common FilesOracleJavajavapath;
add a comment |
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',
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
});
}
});
user6394019 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1419753%2fhow-to-change-java-jdk-version%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
On Linux, if you have both (or more) versions installed, you can use the following command to select the active one:
sudo update-alternatives --config java
Oh. Then excuse me, I'm currently running a Linux variant. I'm going to leave this answer here for Linux users, but I cannot help you.
– zx485
1 hour ago
add a comment |
On Linux, if you have both (or more) versions installed, you can use the following command to select the active one:
sudo update-alternatives --config java
Oh. Then excuse me, I'm currently running a Linux variant. I'm going to leave this answer here for Linux users, but I cannot help you.
– zx485
1 hour ago
add a comment |
On Linux, if you have both (or more) versions installed, you can use the following command to select the active one:
sudo update-alternatives --config java
On Linux, if you have both (or more) versions installed, you can use the following command to select the active one:
sudo update-alternatives --config java
edited 1 hour ago
answered 1 hour ago
zx485zx485
1,2051913
1,2051913
Oh. Then excuse me, I'm currently running a Linux variant. I'm going to leave this answer here for Linux users, but I cannot help you.
– zx485
1 hour ago
add a comment |
Oh. Then excuse me, I'm currently running a Linux variant. I'm going to leave this answer here for Linux users, but I cannot help you.
– zx485
1 hour ago
Oh. Then excuse me, I'm currently running a Linux variant. I'm going to leave this answer here for Linux users, but I cannot help you.
– zx485
1 hour ago
Oh. Then excuse me, I'm currently running a Linux variant. I'm going to leave this answer here for Linux users, but I cannot help you.
– zx485
1 hour ago
add a comment |
In my experience, if you've got a JRE installed, then install a JDK, the path for java.exe etc. will stay pointing at the JRE.
I hope I've answered your two questions, why are they different (because of the order of your path), and how to make the latest one the one that executes (by either installing the latest JRE or else fixing your path by hand) in the details below:
$ where java
C:Program Files (x86)Common FilesOracleJavajavapathjava.exe
C:Program Files (x86)Javajdk1.8.0_121binjava.exe
C:ProgramDataOracleJavajavapathjava.exe
$ which java [btw, which is a GNU tool, not built into Windows]
C:Program Files (x86)Common FilesOracleJavajavapathjava.EXE
$ path
PATH=C:Program Files (x86)Common FilesOracleJavajavapath;C:Program Files (x86)Javajdk1.8.0_121bin;
$ "C:Program Files (x86)Common FilesOracleJavajavapathjava.exe" -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) Client VM (build 25.201-b09, mixed mode)
$ "C:Program Files (x86)Javajdk1.8.0_121binjava.exe" -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) Client VM (build 25.121-b13, mixed mode, sharing)
(Pretending for the moment my JDK version of java was the newer one) I could update the JRE separately and it would probably fix things by putting the correct new version in Common Files for me, or I might just edit my path to put C:Program Files (x86)Javajdk1.8.0_121bin; in front of C:Program Files (x86)Common FilesOracleJavajavapath;
add a comment |
In my experience, if you've got a JRE installed, then install a JDK, the path for java.exe etc. will stay pointing at the JRE.
I hope I've answered your two questions, why are they different (because of the order of your path), and how to make the latest one the one that executes (by either installing the latest JRE or else fixing your path by hand) in the details below:
$ where java
C:Program Files (x86)Common FilesOracleJavajavapathjava.exe
C:Program Files (x86)Javajdk1.8.0_121binjava.exe
C:ProgramDataOracleJavajavapathjava.exe
$ which java [btw, which is a GNU tool, not built into Windows]
C:Program Files (x86)Common FilesOracleJavajavapathjava.EXE
$ path
PATH=C:Program Files (x86)Common FilesOracleJavajavapath;C:Program Files (x86)Javajdk1.8.0_121bin;
$ "C:Program Files (x86)Common FilesOracleJavajavapathjava.exe" -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) Client VM (build 25.201-b09, mixed mode)
$ "C:Program Files (x86)Javajdk1.8.0_121binjava.exe" -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) Client VM (build 25.121-b13, mixed mode, sharing)
(Pretending for the moment my JDK version of java was the newer one) I could update the JRE separately and it would probably fix things by putting the correct new version in Common Files for me, or I might just edit my path to put C:Program Files (x86)Javajdk1.8.0_121bin; in front of C:Program Files (x86)Common FilesOracleJavajavapath;
add a comment |
In my experience, if you've got a JRE installed, then install a JDK, the path for java.exe etc. will stay pointing at the JRE.
I hope I've answered your two questions, why are they different (because of the order of your path), and how to make the latest one the one that executes (by either installing the latest JRE or else fixing your path by hand) in the details below:
$ where java
C:Program Files (x86)Common FilesOracleJavajavapathjava.exe
C:Program Files (x86)Javajdk1.8.0_121binjava.exe
C:ProgramDataOracleJavajavapathjava.exe
$ which java [btw, which is a GNU tool, not built into Windows]
C:Program Files (x86)Common FilesOracleJavajavapathjava.EXE
$ path
PATH=C:Program Files (x86)Common FilesOracleJavajavapath;C:Program Files (x86)Javajdk1.8.0_121bin;
$ "C:Program Files (x86)Common FilesOracleJavajavapathjava.exe" -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) Client VM (build 25.201-b09, mixed mode)
$ "C:Program Files (x86)Javajdk1.8.0_121binjava.exe" -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) Client VM (build 25.121-b13, mixed mode, sharing)
(Pretending for the moment my JDK version of java was the newer one) I could update the JRE separately and it would probably fix things by putting the correct new version in Common Files for me, or I might just edit my path to put C:Program Files (x86)Javajdk1.8.0_121bin; in front of C:Program Files (x86)Common FilesOracleJavajavapath;
In my experience, if you've got a JRE installed, then install a JDK, the path for java.exe etc. will stay pointing at the JRE.
I hope I've answered your two questions, why are they different (because of the order of your path), and how to make the latest one the one that executes (by either installing the latest JRE or else fixing your path by hand) in the details below:
$ where java
C:Program Files (x86)Common FilesOracleJavajavapathjava.exe
C:Program Files (x86)Javajdk1.8.0_121binjava.exe
C:ProgramDataOracleJavajavapathjava.exe
$ which java [btw, which is a GNU tool, not built into Windows]
C:Program Files (x86)Common FilesOracleJavajavapathjava.EXE
$ path
PATH=C:Program Files (x86)Common FilesOracleJavajavapath;C:Program Files (x86)Javajdk1.8.0_121bin;
$ "C:Program Files (x86)Common FilesOracleJavajavapathjava.exe" -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) Client VM (build 25.201-b09, mixed mode)
$ "C:Program Files (x86)Javajdk1.8.0_121binjava.exe" -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) Client VM (build 25.121-b13, mixed mode, sharing)
(Pretending for the moment my JDK version of java was the newer one) I could update the JRE separately and it would probably fix things by putting the correct new version in Common Files for me, or I might just edit my path to put C:Program Files (x86)Javajdk1.8.0_121bin; in front of C:Program Files (x86)Common FilesOracleJavajavapath;
edited 4 mins ago
answered 49 mins ago
MAXdBMAXdB
64
64
add a comment |
add a comment |
user6394019 is a new contributor. Be nice, and check out our Code of Conduct.
user6394019 is a new contributor. Be nice, and check out our Code of Conduct.
user6394019 is a new contributor. Be nice, and check out our Code of Conduct.
user6394019 is a new contributor. Be nice, and check out our Code of Conduct.
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1419753%2fhow-to-change-java-jdk-version%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once.
– Ramhound
1 hour ago