Error could not find libjava.so when running java binary
I uninstalled jdk 1.8 and installed JDK 1.7 on my ubuntu but when I am trying to run java ,I am getting the following Error:
sana@sana:~$ java -version
Error: could not find libjava.so
Error: Could not find Java SE Runtime Environment.
java
|
show 6 more comments
I uninstalled jdk 1.8 and installed JDK 1.7 on my ubuntu but when I am trying to run java ,I am getting the following Error:
sana@sana:~$ java -version
Error: could not find libjava.so
Error: Could not find Java SE Runtime Environment.
java
Make sure jdk1.7 bin directory is in your pathecho $PATH
– storm
Dec 12 '18 at 12:39
I believe jdk1.7 isn't supported anymore. What is the output ofwhich java
andwhich javac
?
– Kulfy
Dec 12 '18 at 12:40
sana@sana:~$ echo $PATH /opt/maven/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/java/jre1.7.0_45/bin:/usr/local/java/jdk1.7.0_45/bin
– sana
Dec 12 '18 at 12:50
sana@sana:~$ which java /usr/bin/java
– sana
Dec 12 '18 at 12:54
sana@sana:~$ which javac /usr/bin/javac
– sana
Dec 12 '18 at 12:54
|
show 6 more comments
I uninstalled jdk 1.8 and installed JDK 1.7 on my ubuntu but when I am trying to run java ,I am getting the following Error:
sana@sana:~$ java -version
Error: could not find libjava.so
Error: Could not find Java SE Runtime Environment.
java
I uninstalled jdk 1.8 and installed JDK 1.7 on my ubuntu but when I am trying to run java ,I am getting the following Error:
sana@sana:~$ java -version
Error: could not find libjava.so
Error: Could not find Java SE Runtime Environment.
java
java
edited Dec 12 '18 at 13:07
sana
asked Dec 12 '18 at 12:32
sanasana
981110
981110
Make sure jdk1.7 bin directory is in your pathecho $PATH
– storm
Dec 12 '18 at 12:39
I believe jdk1.7 isn't supported anymore. What is the output ofwhich java
andwhich javac
?
– Kulfy
Dec 12 '18 at 12:40
sana@sana:~$ echo $PATH /opt/maven/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/java/jre1.7.0_45/bin:/usr/local/java/jdk1.7.0_45/bin
– sana
Dec 12 '18 at 12:50
sana@sana:~$ which java /usr/bin/java
– sana
Dec 12 '18 at 12:54
sana@sana:~$ which javac /usr/bin/javac
– sana
Dec 12 '18 at 12:54
|
show 6 more comments
Make sure jdk1.7 bin directory is in your pathecho $PATH
– storm
Dec 12 '18 at 12:39
I believe jdk1.7 isn't supported anymore. What is the output ofwhich java
andwhich javac
?
– Kulfy
Dec 12 '18 at 12:40
sana@sana:~$ echo $PATH /opt/maven/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/java/jre1.7.0_45/bin:/usr/local/java/jdk1.7.0_45/bin
– sana
Dec 12 '18 at 12:50
sana@sana:~$ which java /usr/bin/java
– sana
Dec 12 '18 at 12:54
sana@sana:~$ which javac /usr/bin/javac
– sana
Dec 12 '18 at 12:54
Make sure jdk1.7 bin directory is in your path
echo $PATH
– storm
Dec 12 '18 at 12:39
Make sure jdk1.7 bin directory is in your path
echo $PATH
– storm
Dec 12 '18 at 12:39
I believe jdk1.7 isn't supported anymore. What is the output of
which java
and which javac
?– Kulfy
Dec 12 '18 at 12:40
I believe jdk1.7 isn't supported anymore. What is the output of
which java
and which javac
?– Kulfy
Dec 12 '18 at 12:40
sana@sana:~$ echo $PATH /opt/maven/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/java/jre1.7.0_45/bin:/usr/local/java/jdk1.7.0_45/bin
– sana
Dec 12 '18 at 12:50
sana@sana:~$ echo $PATH /opt/maven/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/java/jre1.7.0_45/bin:/usr/local/java/jdk1.7.0_45/bin
– sana
Dec 12 '18 at 12:50
sana@sana:~$ which java /usr/bin/java
– sana
Dec 12 '18 at 12:54
sana@sana:~$ which java /usr/bin/java
– sana
Dec 12 '18 at 12:54
sana@sana:~$ which javac /usr/bin/javac
– sana
Dec 12 '18 at 12:54
sana@sana:~$ which javac /usr/bin/javac
– sana
Dec 12 '18 at 12:54
|
show 6 more comments
1 Answer
1
active
oldest
votes
Try rebooting your computer after installing it and try again.
Or you could have a problem similar to this one: https://stackoverflow.com/questions/25954348/error-could-not-find-libjava-so-error-could-not-find-java-2-runtime-environme
One of the poster mentions he has 2 versions installed: "I encounter this issue before. It turns out there are 2 javac program sitting on my machine. They are in /usr/bin/javac and /bin/javac. My system used the /bin/javac one. The right path for me is /usr/bin/javac. Removing /bin/javac helped"
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%2f1100308%2ferror-could-not-find-libjava-so-when-running-java-binary%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
Try rebooting your computer after installing it and try again.
Or you could have a problem similar to this one: https://stackoverflow.com/questions/25954348/error-could-not-find-libjava-so-error-could-not-find-java-2-runtime-environme
One of the poster mentions he has 2 versions installed: "I encounter this issue before. It turns out there are 2 javac program sitting on my machine. They are in /usr/bin/javac and /bin/javac. My system used the /bin/javac one. The right path for me is /usr/bin/javac. Removing /bin/javac helped"
add a comment |
Try rebooting your computer after installing it and try again.
Or you could have a problem similar to this one: https://stackoverflow.com/questions/25954348/error-could-not-find-libjava-so-error-could-not-find-java-2-runtime-environme
One of the poster mentions he has 2 versions installed: "I encounter this issue before. It turns out there are 2 javac program sitting on my machine. They are in /usr/bin/javac and /bin/javac. My system used the /bin/javac one. The right path for me is /usr/bin/javac. Removing /bin/javac helped"
add a comment |
Try rebooting your computer after installing it and try again.
Or you could have a problem similar to this one: https://stackoverflow.com/questions/25954348/error-could-not-find-libjava-so-error-could-not-find-java-2-runtime-environme
One of the poster mentions he has 2 versions installed: "I encounter this issue before. It turns out there are 2 javac program sitting on my machine. They are in /usr/bin/javac and /bin/javac. My system used the /bin/javac one. The right path for me is /usr/bin/javac. Removing /bin/javac helped"
Try rebooting your computer after installing it and try again.
Or you could have a problem similar to this one: https://stackoverflow.com/questions/25954348/error-could-not-find-libjava-so-error-could-not-find-java-2-runtime-environme
One of the poster mentions he has 2 versions installed: "I encounter this issue before. It turns out there are 2 javac program sitting on my machine. They are in /usr/bin/javac and /bin/javac. My system used the /bin/javac one. The right path for me is /usr/bin/javac. Removing /bin/javac helped"
edited Dec 12 '18 at 18:18
answered Dec 12 '18 at 12:39
KevinKevin
1474
1474
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%2f1100308%2ferror-could-not-find-libjava-so-when-running-java-binary%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
Make sure jdk1.7 bin directory is in your path
echo $PATH
– storm
Dec 12 '18 at 12:39
I believe jdk1.7 isn't supported anymore. What is the output of
which java
andwhich javac
?– Kulfy
Dec 12 '18 at 12:40
sana@sana:~$ echo $PATH /opt/maven/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/java/jre1.7.0_45/bin:/usr/local/java/jdk1.7.0_45/bin
– sana
Dec 12 '18 at 12:50
sana@sana:~$ which java /usr/bin/java
– sana
Dec 12 '18 at 12:54
sana@sana:~$ which javac /usr/bin/javac
– sana
Dec 12 '18 at 12:54