JAR is executed with terminal but not with direct clicking
![Multi tool use Multi tool use](http://sgv.ssvwv.com/sg/ssvwvcomimagb.png)
Multi tool use
I have tried the following:
- in terminal it works
- In Intellij it works
- I have tried to launch it with javaw.exe but nothing changes
Are there any other options?
java intellij-idea jar
add a comment |
I have tried the following:
- in terminal it works
- In Intellij it works
- I have tried to launch it with javaw.exe but nothing changes
Are there any other options?
java intellij-idea jar
Please show us how you built the jar file (what is in the manifest?), how you are exactly invoking it on the command line and what output you get?
– Adriaan Koster
Jan 2 at 11:33
The terminal output is exactly my GUi, the manifest is in src/ directory, where the main class is src/sample/Main.class
– Cergo
Jan 2 at 11:35
java -jar myjarlocation.jar
– Cergo
Jan 2 at 11:36
In Windows, you can right click on the icon and set command line with arguments the same commands that worked on command line. Try that.
– Akshay Mathur
Jan 2 at 11:38
add a comment |
I have tried the following:
- in terminal it works
- In Intellij it works
- I have tried to launch it with javaw.exe but nothing changes
Are there any other options?
java intellij-idea jar
I have tried the following:
- in terminal it works
- In Intellij it works
- I have tried to launch it with javaw.exe but nothing changes
Are there any other options?
java intellij-idea jar
java intellij-idea jar
edited Jan 3 at 1:00
![](https://i.stack.imgur.com/yOfDr.png?s=32&g=1)
![](https://i.stack.imgur.com/yOfDr.png?s=32&g=1)
Andrew Thompson
153k28163345
153k28163345
asked Jan 2 at 11:31
CergoCergo
3410
3410
Please show us how you built the jar file (what is in the manifest?), how you are exactly invoking it on the command line and what output you get?
– Adriaan Koster
Jan 2 at 11:33
The terminal output is exactly my GUi, the manifest is in src/ directory, where the main class is src/sample/Main.class
– Cergo
Jan 2 at 11:35
java -jar myjarlocation.jar
– Cergo
Jan 2 at 11:36
In Windows, you can right click on the icon and set command line with arguments the same commands that worked on command line. Try that.
– Akshay Mathur
Jan 2 at 11:38
add a comment |
Please show us how you built the jar file (what is in the manifest?), how you are exactly invoking it on the command line and what output you get?
– Adriaan Koster
Jan 2 at 11:33
The terminal output is exactly my GUi, the manifest is in src/ directory, where the main class is src/sample/Main.class
– Cergo
Jan 2 at 11:35
java -jar myjarlocation.jar
– Cergo
Jan 2 at 11:36
In Windows, you can right click on the icon and set command line with arguments the same commands that worked on command line. Try that.
– Akshay Mathur
Jan 2 at 11:38
Please show us how you built the jar file (what is in the manifest?), how you are exactly invoking it on the command line and what output you get?
– Adriaan Koster
Jan 2 at 11:33
Please show us how you built the jar file (what is in the manifest?), how you are exactly invoking it on the command line and what output you get?
– Adriaan Koster
Jan 2 at 11:33
The terminal output is exactly my GUi, the manifest is in src/ directory, where the main class is src/sample/Main.class
– Cergo
Jan 2 at 11:35
The terminal output is exactly my GUi, the manifest is in src/ directory, where the main class is src/sample/Main.class
– Cergo
Jan 2 at 11:35
java -jar myjarlocation.jar
– Cergo
Jan 2 at 11:36
java -jar myjarlocation.jar
– Cergo
Jan 2 at 11:36
In Windows, you can right click on the icon and set command line with arguments the same commands that worked on command line. Try that.
– Akshay Mathur
Jan 2 at 11:38
In Windows, you can right click on the icon and set command line with arguments the same commands that worked on command line. Try that.
– Akshay Mathur
Jan 2 at 11:38
add a comment |
1 Answer
1
active
oldest
votes
This looks like an OS problem that an application building one -- because you said that it works in your IDE and terminal.
Make sure that you installed Java properly in your machine.
In Windows/MacOs, after installing Java, the *.jar
files are automatically associated with the java -jar
command and makes it runnable via double-click.
In linux, this varies on the flavour or DE you are using. But there's probably a utility in your OS to open *.jar
files using java -jar
command.
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%2f54005568%2fjar-is-executed-with-terminal-but-not-with-direct-clicking%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
This looks like an OS problem that an application building one -- because you said that it works in your IDE and terminal.
Make sure that you installed Java properly in your machine.
In Windows/MacOs, after installing Java, the *.jar
files are automatically associated with the java -jar
command and makes it runnable via double-click.
In linux, this varies on the flavour or DE you are using. But there's probably a utility in your OS to open *.jar
files using java -jar
command.
add a comment |
This looks like an OS problem that an application building one -- because you said that it works in your IDE and terminal.
Make sure that you installed Java properly in your machine.
In Windows/MacOs, after installing Java, the *.jar
files are automatically associated with the java -jar
command and makes it runnable via double-click.
In linux, this varies on the flavour or DE you are using. But there's probably a utility in your OS to open *.jar
files using java -jar
command.
add a comment |
This looks like an OS problem that an application building one -- because you said that it works in your IDE and terminal.
Make sure that you installed Java properly in your machine.
In Windows/MacOs, after installing Java, the *.jar
files are automatically associated with the java -jar
command and makes it runnable via double-click.
In linux, this varies on the flavour or DE you are using. But there's probably a utility in your OS to open *.jar
files using java -jar
command.
This looks like an OS problem that an application building one -- because you said that it works in your IDE and terminal.
Make sure that you installed Java properly in your machine.
In Windows/MacOs, after installing Java, the *.jar
files are automatically associated with the java -jar
command and makes it runnable via double-click.
In linux, this varies on the flavour or DE you are using. But there's probably a utility in your OS to open *.jar
files using java -jar
command.
answered Jan 2 at 11:44
KaNa0011KaNa0011
615614
615614
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%2f54005568%2fjar-is-executed-with-terminal-but-not-with-direct-clicking%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
0Yvfv 5TT1,77,IRshsSBxufs 9KyxxAdXjeBhq85N 0WiuL3,mQ2 ksD13hUWlH2eWWq,M5vo7HS7WI 4FgMK WO BCvL9Ti2d uXhYNBWZQq
Please show us how you built the jar file (what is in the manifest?), how you are exactly invoking it on the command line and what output you get?
– Adriaan Koster
Jan 2 at 11:33
The terminal output is exactly my GUi, the manifest is in src/ directory, where the main class is src/sample/Main.class
– Cergo
Jan 2 at 11:35
java -jar myjarlocation.jar
– Cergo
Jan 2 at 11:36
In Windows, you can right click on the icon and set command line with arguments the same commands that worked on command line. Try that.
– Akshay Mathur
Jan 2 at 11:38