How do I stop oracle JDK from hijacking PATH and breaking update-alternatives? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)How to remove Oracle JDKTroubleshoot sun-java6-jdk installationMy Java install is brokenJDK/JRE explanation of comands for installSwitching to Java 7Unable to install jdk 6 after uninstalling jdk 7JDK 8 install in ubuntuhow to activate Java 8u51 plugin on Firefox?Netbeans cannot find javawhere to update Java JDK? (not how to install)how fix mistake made with update-alternatives?
"klopfte jemand" or "jemand klopfte"?
Relating to the President and obstruction, were Mueller's conclusions preordained?
License to disallow distribution in closed source software, but allow exceptions made by owner?
Did any compiler fully use 80-bit floating point?
Google .dev domain strangely redirects to https
Are the endpoints of the domain of a function counted as critical points?
Can you force honesty by using the Speak with Dead and Zone of Truth spells together?
Differences to CCompactSize and CVarInt
Why datecode is SO IMPORTANT to chip manufacturers?
Test print coming out spongy
Why is a lens darker than other ones when applying the same settings?
Moving a wrapfig vertically to encroach partially on a subsection title
AppleTVs create a chatty alternate WiFi network
Why are vacuum tubes still used in amateur radios?
Found this skink in my tomato plant bucket. Is he trapped? Or could he leave if he wanted?
Resize vertical bars (absolute-value symbols)
GDP with Intermediate Production
Does the Mueller report show a conspiracy between Russia and the Trump Campaign?
Is openssl rand command cryptographically secure?
Nose gear failure in single prop aircraft: belly landing or nose-gear up landing?
The test team as an enemy of development? And how can this be avoided?
Why not send Voyager 3 and 4 following up the paths taken by Voyager 1 and 2 to re-transmit signals of later as they fly away from Earth?
Mounting TV on a weird wall that has some material between the drywall and stud
Monty Hall Problem-Probability Paradox
How do I stop oracle JDK from hijacking PATH and breaking update-alternatives?
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)How to remove Oracle JDKTroubleshoot sun-java6-jdk installationMy Java install is brokenJDK/JRE explanation of comands for installSwitching to Java 7Unable to install jdk 6 after uninstalling jdk 7JDK 8 install in ubuntuhow to activate Java 8u51 plugin on Firefox?Netbeans cannot find javawhere to update Java JDK? (not how to install)how fix mistake made with update-alternatives?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I installed oracle jdk on ubuntu 14.04. Now I want to toggle back to openjdk:
sudo update-alternatives --config java
sudo update-alternatives --config javac
But it doesn't work. It seems oracle's jdk somehow keeps adding itself to my $PATH:
...:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:...
I've found and killed /etc/profile.d/jdk.csh, but there seems to be a failsafe. The audacity!!
How can I fix this?
java jdk openjdk oracle
|
show 4 more comments
I installed oracle jdk on ubuntu 14.04. Now I want to toggle back to openjdk:
sudo update-alternatives --config java
sudo update-alternatives --config javac
But it doesn't work. It seems oracle's jdk somehow keeps adding itself to my $PATH:
...:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:...
I've found and killed /etc/profile.d/jdk.csh, but there seems to be a failsafe. The audacity!!
How can I fix this?
java jdk openjdk oracle
What of thejdk.shin that same location, did you kill that too?
– George Udosen
Mar 20 '17 at 19:56
@George There aren't any other related files there. I've tried searching through /etc but haven't found anything else updating PATH.
– jozxyqk
Mar 20 '17 at 20:50
2
Possible duplicate of How to remove Oracle JDK
– George Udosen
Mar 20 '17 at 23:30
This would have been the best way to remove itsudo update-alternatives --remove "java" "/usr/lib/jvm/jdk[version]/bin/java"
– George Udosen
Mar 20 '17 at 23:31
@George I'd prefer not to actually remove it if possible. I just want to temporarily swap to openjdk and then swap back again. It seems likeupdate-alternativeswas designed for this.
– jozxyqk
Mar 21 '17 at 2:09
|
show 4 more comments
I installed oracle jdk on ubuntu 14.04. Now I want to toggle back to openjdk:
sudo update-alternatives --config java
sudo update-alternatives --config javac
But it doesn't work. It seems oracle's jdk somehow keeps adding itself to my $PATH:
...:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:...
I've found and killed /etc/profile.d/jdk.csh, but there seems to be a failsafe. The audacity!!
How can I fix this?
java jdk openjdk oracle
I installed oracle jdk on ubuntu 14.04. Now I want to toggle back to openjdk:
sudo update-alternatives --config java
sudo update-alternatives --config javac
But it doesn't work. It seems oracle's jdk somehow keeps adding itself to my $PATH:
...:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:...
I've found and killed /etc/profile.d/jdk.csh, but there seems to be a failsafe. The audacity!!
How can I fix this?
java jdk openjdk oracle
java jdk openjdk oracle
asked Mar 20 '17 at 19:35
jozxyqkjozxyqk
625618
625618
What of thejdk.shin that same location, did you kill that too?
– George Udosen
Mar 20 '17 at 19:56
@George There aren't any other related files there. I've tried searching through /etc but haven't found anything else updating PATH.
– jozxyqk
Mar 20 '17 at 20:50
2
Possible duplicate of How to remove Oracle JDK
– George Udosen
Mar 20 '17 at 23:30
This would have been the best way to remove itsudo update-alternatives --remove "java" "/usr/lib/jvm/jdk[version]/bin/java"
– George Udosen
Mar 20 '17 at 23:31
@George I'd prefer not to actually remove it if possible. I just want to temporarily swap to openjdk and then swap back again. It seems likeupdate-alternativeswas designed for this.
– jozxyqk
Mar 21 '17 at 2:09
|
show 4 more comments
What of thejdk.shin that same location, did you kill that too?
– George Udosen
Mar 20 '17 at 19:56
@George There aren't any other related files there. I've tried searching through /etc but haven't found anything else updating PATH.
– jozxyqk
Mar 20 '17 at 20:50
2
Possible duplicate of How to remove Oracle JDK
– George Udosen
Mar 20 '17 at 23:30
This would have been the best way to remove itsudo update-alternatives --remove "java" "/usr/lib/jvm/jdk[version]/bin/java"
– George Udosen
Mar 20 '17 at 23:31
@George I'd prefer not to actually remove it if possible. I just want to temporarily swap to openjdk and then swap back again. It seems likeupdate-alternativeswas designed for this.
– jozxyqk
Mar 21 '17 at 2:09
What of the
jdk.sh in that same location, did you kill that too?– George Udosen
Mar 20 '17 at 19:56
What of the
jdk.sh in that same location, did you kill that too?– George Udosen
Mar 20 '17 at 19:56
@George There aren't any other related files there. I've tried searching through /etc but haven't found anything else updating PATH.
– jozxyqk
Mar 20 '17 at 20:50
@George There aren't any other related files there. I've tried searching through /etc but haven't found anything else updating PATH.
– jozxyqk
Mar 20 '17 at 20:50
2
2
Possible duplicate of How to remove Oracle JDK
– George Udosen
Mar 20 '17 at 23:30
Possible duplicate of How to remove Oracle JDK
– George Udosen
Mar 20 '17 at 23:30
This would have been the best way to remove it
sudo update-alternatives --remove "java" "/usr/lib/jvm/jdk[version]/bin/java" – George Udosen
Mar 20 '17 at 23:31
This would have been the best way to remove it
sudo update-alternatives --remove "java" "/usr/lib/jvm/jdk[version]/bin/java" – George Udosen
Mar 20 '17 at 23:31
@George I'd prefer not to actually remove it if possible. I just want to temporarily swap to openjdk and then swap back again. It seems like
update-alternatives was designed for this.– jozxyqk
Mar 21 '17 at 2:09
@George I'd prefer not to actually remove it if possible. I just want to temporarily swap to openjdk and then swap back again. It seems like
update-alternatives was designed for this.– jozxyqk
Mar 21 '17 at 2:09
|
show 4 more comments
1 Answer
1
active
oldest
votes
I think you are on the right track by removing /etc/profile.d/jdk.csh and /etc/profile.d/jdk.sh. You just have to re-login or reboot so that the PATH changes have effect.
New contributor
user946965 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 |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
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
);
);
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%2faskubuntu.com%2fquestions%2f895044%2fhow-do-i-stop-oracle-jdk-from-hijacking-path-and-breaking-update-alternatives%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I think you are on the right track by removing /etc/profile.d/jdk.csh and /etc/profile.d/jdk.sh. You just have to re-login or reboot so that the PATH changes have effect.
New contributor
user946965 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 think you are on the right track by removing /etc/profile.d/jdk.csh and /etc/profile.d/jdk.sh. You just have to re-login or reboot so that the PATH changes have effect.
New contributor
user946965 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 think you are on the right track by removing /etc/profile.d/jdk.csh and /etc/profile.d/jdk.sh. You just have to re-login or reboot so that the PATH changes have effect.
New contributor
user946965 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I think you are on the right track by removing /etc/profile.d/jdk.csh and /etc/profile.d/jdk.sh. You just have to re-login or reboot so that the PATH changes have effect.
New contributor
user946965 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user946965 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
answered 3 mins ago
user946965user946965
1
1
New contributor
user946965 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user946965 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
user946965 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 |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- 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%2faskubuntu.com%2fquestions%2f895044%2fhow-do-i-stop-oracle-jdk-from-hijacking-path-and-breaking-update-alternatives%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
What of the
jdk.shin that same location, did you kill that too?– George Udosen
Mar 20 '17 at 19:56
@George There aren't any other related files there. I've tried searching through /etc but haven't found anything else updating PATH.
– jozxyqk
Mar 20 '17 at 20:50
2
Possible duplicate of How to remove Oracle JDK
– George Udosen
Mar 20 '17 at 23:30
This would have been the best way to remove it
sudo update-alternatives --remove "java" "/usr/lib/jvm/jdk[version]/bin/java"– George Udosen
Mar 20 '17 at 23:31
@George I'd prefer not to actually remove it if possible. I just want to temporarily swap to openjdk and then swap back again. It seems like
update-alternativeswas designed for this.– jozxyqk
Mar 21 '17 at 2:09