“unable to load shared object” when loading the rJava library
I apologize in advance for my bad english, i hope that someone can help me.
I have to load an Excel file .xlsx on R, but:
library(xlsx)
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'C:/Users/danil/Documents/R/win-library/3.4/rJava/libs/x64/rJava.dll':
LoadLibrary failure: Impossibile trovare il modulo specificato.
Error: package ‘rJava’ could not be loaded
So, i tried to install Java, Java SE-Development Kit 10 and Java Runtime Environment 10, 64 bit for both. But, also in this case:
library(rJava)
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'C:/Users/danil/Documents/R/win-library/3.4/rJava/libs/x64/rJava.dll':
LoadLibrary failure: Impossibile trovare il modulo specificato.
What can i do?
java r
|
show 3 more comments
I apologize in advance for my bad english, i hope that someone can help me.
I have to load an Excel file .xlsx on R, but:
library(xlsx)
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'C:/Users/danil/Documents/R/win-library/3.4/rJava/libs/x64/rJava.dll':
LoadLibrary failure: Impossibile trovare il modulo specificato.
Error: package ‘rJava’ could not be loaded
So, i tried to install Java, Java SE-Development Kit 10 and Java Runtime Environment 10, 64 bit for both. But, also in this case:
library(rJava)
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'C:/Users/danil/Documents/R/win-library/3.4/rJava/libs/x64/rJava.dll':
LoadLibrary failure: Impossibile trovare il modulo specificato.
What can i do?
java r
Hi @francesco... welcome to SO. I've edited your title to be a bit more informative as a question.
– user3603486
Apr 7 '18 at 19:07
No problem, i hope that it will also help anybody else.
– Francesco Totti
Apr 7 '18 at 19:13
How did you install xlsx package? Or have a look here stackoverflow.com/q/37735108/5784831
– Christoph
Apr 7 '18 at 19:25
I wasnt'able to install xlsx package... It says "Error: package or namespace load failed for ‘rJava’". I don't know what to do, i'm a newbie of R.
– Francesco Totti
Apr 7 '18 at 20:26
What is your OS? Usually, when I get these errors, I look all over the error messages, such often there will be some libraries/packages suggested for installing for each operating system.
– Cainã Max Couto-Silva
Apr 8 '18 at 3:23
|
show 3 more comments
I apologize in advance for my bad english, i hope that someone can help me.
I have to load an Excel file .xlsx on R, but:
library(xlsx)
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'C:/Users/danil/Documents/R/win-library/3.4/rJava/libs/x64/rJava.dll':
LoadLibrary failure: Impossibile trovare il modulo specificato.
Error: package ‘rJava’ could not be loaded
So, i tried to install Java, Java SE-Development Kit 10 and Java Runtime Environment 10, 64 bit for both. But, also in this case:
library(rJava)
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'C:/Users/danil/Documents/R/win-library/3.4/rJava/libs/x64/rJava.dll':
LoadLibrary failure: Impossibile trovare il modulo specificato.
What can i do?
java r
I apologize in advance for my bad english, i hope that someone can help me.
I have to load an Excel file .xlsx on R, but:
library(xlsx)
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'C:/Users/danil/Documents/R/win-library/3.4/rJava/libs/x64/rJava.dll':
LoadLibrary failure: Impossibile trovare il modulo specificato.
Error: package ‘rJava’ could not be loaded
So, i tried to install Java, Java SE-Development Kit 10 and Java Runtime Environment 10, 64 bit for both. But, also in this case:
library(rJava)
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'C:/Users/danil/Documents/R/win-library/3.4/rJava/libs/x64/rJava.dll':
LoadLibrary failure: Impossibile trovare il modulo specificato.
What can i do?
java r
java r
edited Apr 7 '18 at 20:52
user2554330
9,56711239
9,56711239
asked Apr 7 '18 at 19:03
Francesco TottiFrancesco Totti
63
63
Hi @francesco... welcome to SO. I've edited your title to be a bit more informative as a question.
– user3603486
Apr 7 '18 at 19:07
No problem, i hope that it will also help anybody else.
– Francesco Totti
Apr 7 '18 at 19:13
How did you install xlsx package? Or have a look here stackoverflow.com/q/37735108/5784831
– Christoph
Apr 7 '18 at 19:25
I wasnt'able to install xlsx package... It says "Error: package or namespace load failed for ‘rJava’". I don't know what to do, i'm a newbie of R.
– Francesco Totti
Apr 7 '18 at 20:26
What is your OS? Usually, when I get these errors, I look all over the error messages, such often there will be some libraries/packages suggested for installing for each operating system.
– Cainã Max Couto-Silva
Apr 8 '18 at 3:23
|
show 3 more comments
Hi @francesco... welcome to SO. I've edited your title to be a bit more informative as a question.
– user3603486
Apr 7 '18 at 19:07
No problem, i hope that it will also help anybody else.
– Francesco Totti
Apr 7 '18 at 19:13
How did you install xlsx package? Or have a look here stackoverflow.com/q/37735108/5784831
– Christoph
Apr 7 '18 at 19:25
I wasnt'able to install xlsx package... It says "Error: package or namespace load failed for ‘rJava’". I don't know what to do, i'm a newbie of R.
– Francesco Totti
Apr 7 '18 at 20:26
What is your OS? Usually, when I get these errors, I look all over the error messages, such often there will be some libraries/packages suggested for installing for each operating system.
– Cainã Max Couto-Silva
Apr 8 '18 at 3:23
Hi @francesco... welcome to SO. I've edited your title to be a bit more informative as a question.
– user3603486
Apr 7 '18 at 19:07
Hi @francesco... welcome to SO. I've edited your title to be a bit more informative as a question.
– user3603486
Apr 7 '18 at 19:07
No problem, i hope that it will also help anybody else.
– Francesco Totti
Apr 7 '18 at 19:13
No problem, i hope that it will also help anybody else.
– Francesco Totti
Apr 7 '18 at 19:13
How did you install xlsx package? Or have a look here stackoverflow.com/q/37735108/5784831
– Christoph
Apr 7 '18 at 19:25
How did you install xlsx package? Or have a look here stackoverflow.com/q/37735108/5784831
– Christoph
Apr 7 '18 at 19:25
I wasnt'able to install xlsx package... It says "Error: package or namespace load failed for ‘rJava’". I don't know what to do, i'm a newbie of R.
– Francesco Totti
Apr 7 '18 at 20:26
I wasnt'able to install xlsx package... It says "Error: package or namespace load failed for ‘rJava’". I don't know what to do, i'm a newbie of R.
– Francesco Totti
Apr 7 '18 at 20:26
What is your OS? Usually, when I get these errors, I look all over the error messages, such often there will be some libraries/packages suggested for installing for each operating system.
– Cainã Max Couto-Silva
Apr 8 '18 at 3:23
What is your OS? Usually, when I get these errors, I look all over the error messages, such often there will be some libraries/packages suggested for installing for each operating system.
– Cainã Max Couto-Silva
Apr 8 '18 at 3:23
|
show 3 more comments
2 Answers
2
active
oldest
votes
This was happening to me as well (also Windows 10), and the problem with mine was that the environment variable was not set properly. In my case, I had to do
Sys.setenv('JAVA_HOME' = 'C:/Program Files (x86)/Java/jre1.8.0_161/')
Just change the folder name to where Java lives in your computer, and let me know if this doesn't work out.
Glad it worked out. Feel free to accept the answer if you found it useful.
– Kim
May 11 '18 at 4:35
Do you happen to know why do we need to setenv() for JAVA_HOME in R, when I had already set JAVA_HOME in system variables? Using Windows 10
– Digvijay Sawant
May 14 '18 at 17:40
add a comment |
In Ubuntu 16.04 I did the following trick in RStudio:
Sys.setenv('JAVA_HOME' = '/usr/lib/jvm/java-8-oracle/jre')
Surprisingly, but
Sys.setenv('JAVA_HOME' = '/usr/lib/jvm/java-8-oracle/')
didn't work for me.
add a comment |
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
});
}
});
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%2fstackoverflow.com%2fquestions%2f49710941%2funable-to-load-shared-object-when-loading-the-rjava-library%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
This was happening to me as well (also Windows 10), and the problem with mine was that the environment variable was not set properly. In my case, I had to do
Sys.setenv('JAVA_HOME' = 'C:/Program Files (x86)/Java/jre1.8.0_161/')
Just change the folder name to where Java lives in your computer, and let me know if this doesn't work out.
Glad it worked out. Feel free to accept the answer if you found it useful.
– Kim
May 11 '18 at 4:35
Do you happen to know why do we need to setenv() for JAVA_HOME in R, when I had already set JAVA_HOME in system variables? Using Windows 10
– Digvijay Sawant
May 14 '18 at 17:40
add a comment |
This was happening to me as well (also Windows 10), and the problem with mine was that the environment variable was not set properly. In my case, I had to do
Sys.setenv('JAVA_HOME' = 'C:/Program Files (x86)/Java/jre1.8.0_161/')
Just change the folder name to where Java lives in your computer, and let me know if this doesn't work out.
Glad it worked out. Feel free to accept the answer if you found it useful.
– Kim
May 11 '18 at 4:35
Do you happen to know why do we need to setenv() for JAVA_HOME in R, when I had already set JAVA_HOME in system variables? Using Windows 10
– Digvijay Sawant
May 14 '18 at 17:40
add a comment |
This was happening to me as well (also Windows 10), and the problem with mine was that the environment variable was not set properly. In my case, I had to do
Sys.setenv('JAVA_HOME' = 'C:/Program Files (x86)/Java/jre1.8.0_161/')
Just change the folder name to where Java lives in your computer, and let me know if this doesn't work out.
This was happening to me as well (also Windows 10), and the problem with mine was that the environment variable was not set properly. In my case, I had to do
Sys.setenv('JAVA_HOME' = 'C:/Program Files (x86)/Java/jre1.8.0_161/')
Just change the folder name to where Java lives in your computer, and let me know if this doesn't work out.
answered Apr 18 '18 at 1:39
KimKim
1,4131027
1,4131027
Glad it worked out. Feel free to accept the answer if you found it useful.
– Kim
May 11 '18 at 4:35
Do you happen to know why do we need to setenv() for JAVA_HOME in R, when I had already set JAVA_HOME in system variables? Using Windows 10
– Digvijay Sawant
May 14 '18 at 17:40
add a comment |
Glad it worked out. Feel free to accept the answer if you found it useful.
– Kim
May 11 '18 at 4:35
Do you happen to know why do we need to setenv() for JAVA_HOME in R, when I had already set JAVA_HOME in system variables? Using Windows 10
– Digvijay Sawant
May 14 '18 at 17:40
Glad it worked out. Feel free to accept the answer if you found it useful.
– Kim
May 11 '18 at 4:35
Glad it worked out. Feel free to accept the answer if you found it useful.
– Kim
May 11 '18 at 4:35
Do you happen to know why do we need to setenv() for JAVA_HOME in R, when I had already set JAVA_HOME in system variables? Using Windows 10
– Digvijay Sawant
May 14 '18 at 17:40
Do you happen to know why do we need to setenv() for JAVA_HOME in R, when I had already set JAVA_HOME in system variables? Using Windows 10
– Digvijay Sawant
May 14 '18 at 17:40
add a comment |
In Ubuntu 16.04 I did the following trick in RStudio:
Sys.setenv('JAVA_HOME' = '/usr/lib/jvm/java-8-oracle/jre')
Surprisingly, but
Sys.setenv('JAVA_HOME' = '/usr/lib/jvm/java-8-oracle/')
didn't work for me.
add a comment |
In Ubuntu 16.04 I did the following trick in RStudio:
Sys.setenv('JAVA_HOME' = '/usr/lib/jvm/java-8-oracle/jre')
Surprisingly, but
Sys.setenv('JAVA_HOME' = '/usr/lib/jvm/java-8-oracle/')
didn't work for me.
add a comment |
In Ubuntu 16.04 I did the following trick in RStudio:
Sys.setenv('JAVA_HOME' = '/usr/lib/jvm/java-8-oracle/jre')
Surprisingly, but
Sys.setenv('JAVA_HOME' = '/usr/lib/jvm/java-8-oracle/')
didn't work for me.
In Ubuntu 16.04 I did the following trick in RStudio:
Sys.setenv('JAVA_HOME' = '/usr/lib/jvm/java-8-oracle/jre')
Surprisingly, but
Sys.setenv('JAVA_HOME' = '/usr/lib/jvm/java-8-oracle/')
didn't work for me.
answered Jan 23 at 8:29
KenelmKenelm
1
1
add a comment |
add a comment |
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.
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%2fstackoverflow.com%2fquestions%2f49710941%2funable-to-load-shared-object-when-loading-the-rjava-library%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
Hi @francesco... welcome to SO. I've edited your title to be a bit more informative as a question.
– user3603486
Apr 7 '18 at 19:07
No problem, i hope that it will also help anybody else.
– Francesco Totti
Apr 7 '18 at 19:13
How did you install xlsx package? Or have a look here stackoverflow.com/q/37735108/5784831
– Christoph
Apr 7 '18 at 19:25
I wasnt'able to install xlsx package... It says "Error: package or namespace load failed for ‘rJava’". I don't know what to do, i'm a newbie of R.
– Francesco Totti
Apr 7 '18 at 20:26
What is your OS? Usually, when I get these errors, I look all over the error messages, such often there will be some libraries/packages suggested for installing for each operating system.
– Cainã Max Couto-Silva
Apr 8 '18 at 3:23