Unable to execute jar file on Linux subsystem in Windows
I'm attempting run a jar file, but am running into the "Unable to access jar file" error.
When I run it from the Windows path (I hope the term is right, am new to this), it runs fine:
java -jar /mnt/c/jars/filename.jar <parameter>
This runs without any issues.
I downloaded this jar into the Linux filesystem, using wget, into /home/username/jars.
I checked, and the jar file is there.
Now, when I run:
java -jar ~/jars/filename.jar <parameter>
I get an error, saying:
Error: Unable to access jarfile /home/username/jars/filename.jar
And I'm getting a similar error when i go into the jars directory and run the command:
java -jar filename.jar <parameter>
Any ideas as to what could be the problem?
From a suggestion in the comments, i ran:
ls -l ~/
and I got:
drwxrwxrwx 1 username username 512 Jan 28 11:29 jars
java windows-subsystem-for-linux jar
|
show 5 more comments
I'm attempting run a jar file, but am running into the "Unable to access jar file" error.
When I run it from the Windows path (I hope the term is right, am new to this), it runs fine:
java -jar /mnt/c/jars/filename.jar <parameter>
This runs without any issues.
I downloaded this jar into the Linux filesystem, using wget, into /home/username/jars.
I checked, and the jar file is there.
Now, when I run:
java -jar ~/jars/filename.jar <parameter>
I get an error, saying:
Error: Unable to access jarfile /home/username/jars/filename.jar
And I'm getting a similar error when i go into the jars directory and run the command:
java -jar filename.jar <parameter>
Any ideas as to what could be the problem?
From a suggestion in the comments, i ran:
ls -l ~/
and I got:
drwxrwxrwx 1 username username 512 Jan 28 11:29 jars
java windows-subsystem-for-linux jar
1
the jar file permission and owner? is it executable?
– AtomiX84
Jan 28 at 11:46
yes, it's executable. I don't think its an issue with that
– user3377812
Jan 28 at 12:01
The.jar
file doesn't need to be executable when run withjava
; however, the path to the directory needs to be executable. So check the permissions of~/jars
.
– Jos
Jan 28 at 12:01
I did that. Got -rwxrwxrwx
– user3377812
Jan 28 at 12:06
Are you sure? That doesn't look like a dictionary.
– Jos
Jan 28 at 12:09
|
show 5 more comments
I'm attempting run a jar file, but am running into the "Unable to access jar file" error.
When I run it from the Windows path (I hope the term is right, am new to this), it runs fine:
java -jar /mnt/c/jars/filename.jar <parameter>
This runs without any issues.
I downloaded this jar into the Linux filesystem, using wget, into /home/username/jars.
I checked, and the jar file is there.
Now, when I run:
java -jar ~/jars/filename.jar <parameter>
I get an error, saying:
Error: Unable to access jarfile /home/username/jars/filename.jar
And I'm getting a similar error when i go into the jars directory and run the command:
java -jar filename.jar <parameter>
Any ideas as to what could be the problem?
From a suggestion in the comments, i ran:
ls -l ~/
and I got:
drwxrwxrwx 1 username username 512 Jan 28 11:29 jars
java windows-subsystem-for-linux jar
I'm attempting run a jar file, but am running into the "Unable to access jar file" error.
When I run it from the Windows path (I hope the term is right, am new to this), it runs fine:
java -jar /mnt/c/jars/filename.jar <parameter>
This runs without any issues.
I downloaded this jar into the Linux filesystem, using wget, into /home/username/jars.
I checked, and the jar file is there.
Now, when I run:
java -jar ~/jars/filename.jar <parameter>
I get an error, saying:
Error: Unable to access jarfile /home/username/jars/filename.jar
And I'm getting a similar error when i go into the jars directory and run the command:
java -jar filename.jar <parameter>
Any ideas as to what could be the problem?
From a suggestion in the comments, i ran:
ls -l ~/
and I got:
drwxrwxrwx 1 username username 512 Jan 28 11:29 jars
java windows-subsystem-for-linux jar
java windows-subsystem-for-linux jar
edited Jan 28 at 12:20
user3377812
asked Jan 28 at 11:23
user3377812user3377812
11
11
1
the jar file permission and owner? is it executable?
– AtomiX84
Jan 28 at 11:46
yes, it's executable. I don't think its an issue with that
– user3377812
Jan 28 at 12:01
The.jar
file doesn't need to be executable when run withjava
; however, the path to the directory needs to be executable. So check the permissions of~/jars
.
– Jos
Jan 28 at 12:01
I did that. Got -rwxrwxrwx
– user3377812
Jan 28 at 12:06
Are you sure? That doesn't look like a dictionary.
– Jos
Jan 28 at 12:09
|
show 5 more comments
1
the jar file permission and owner? is it executable?
– AtomiX84
Jan 28 at 11:46
yes, it's executable. I don't think its an issue with that
– user3377812
Jan 28 at 12:01
The.jar
file doesn't need to be executable when run withjava
; however, the path to the directory needs to be executable. So check the permissions of~/jars
.
– Jos
Jan 28 at 12:01
I did that. Got -rwxrwxrwx
– user3377812
Jan 28 at 12:06
Are you sure? That doesn't look like a dictionary.
– Jos
Jan 28 at 12:09
1
1
the jar file permission and owner? is it executable?
– AtomiX84
Jan 28 at 11:46
the jar file permission and owner? is it executable?
– AtomiX84
Jan 28 at 11:46
yes, it's executable. I don't think its an issue with that
– user3377812
Jan 28 at 12:01
yes, it's executable. I don't think its an issue with that
– user3377812
Jan 28 at 12:01
The
.jar
file doesn't need to be executable when run with java
; however, the path to the directory needs to be executable. So check the permissions of ~/jars
.– Jos
Jan 28 at 12:01
The
.jar
file doesn't need to be executable when run with java
; however, the path to the directory needs to be executable. So check the permissions of ~/jars
.– Jos
Jan 28 at 12:01
I did that. Got -rwxrwxrwx
– user3377812
Jan 28 at 12:06
I did that. Got -rwxrwxrwx
– user3377812
Jan 28 at 12:06
Are you sure? That doesn't look like a dictionary.
– Jos
Jan 28 at 12:09
Are you sure? That doesn't look like a dictionary.
– Jos
Jan 28 at 12:09
|
show 5 more comments
0
active
oldest
votes
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%2f1113512%2funable-to-execute-jar-file-on-linux-subsystem-in-windows%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f1113512%2funable-to-execute-jar-file-on-linux-subsystem-in-windows%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
1
the jar file permission and owner? is it executable?
– AtomiX84
Jan 28 at 11:46
yes, it's executable. I don't think its an issue with that
– user3377812
Jan 28 at 12:01
The
.jar
file doesn't need to be executable when run withjava
; however, the path to the directory needs to be executable. So check the permissions of~/jars
.– Jos
Jan 28 at 12:01
I did that. Got -rwxrwxrwx
– user3377812
Jan 28 at 12:06
Are you sure? That doesn't look like a dictionary.
– Jos
Jan 28 at 12:09