JAR is executed with terminal but not with direct clicking

Multi tool use
Multi tool use












0















I have tried the following:




  1. in terminal it works


  2. In Intellij it works


  3. I have tried to launch it with javaw.exe but nothing changes



Are there any other options?










share|improve this question

























  • 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
















0















I have tried the following:




  1. in terminal it works


  2. In Intellij it works


  3. I have tried to launch it with javaw.exe but nothing changes



Are there any other options?










share|improve this question

























  • 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














0












0








0








I have tried the following:




  1. in terminal it works


  2. In Intellij it works


  3. I have tried to launch it with javaw.exe but nothing changes



Are there any other options?










share|improve this question
















I have tried the following:




  1. in terminal it works


  2. In Intellij it works


  3. I have tried to launch it with javaw.exe but nothing changes



Are there any other options?







java intellij-idea jar






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 3 at 1:00









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



















  • 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












1 Answer
1






active

oldest

votes


















0














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.






share|improve this answer























    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
    });


    }
    });














    draft saved

    draft discarded


















    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









    0














    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.






    share|improve this answer




























      0














      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.






      share|improve this answer


























        0












        0








        0







        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.






        share|improve this answer













        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.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 2 at 11:44









        KaNa0011KaNa0011

        615614




        615614
































            draft saved

            draft discarded




















































            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.




            draft saved


            draft discarded














            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





















































            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
            bc0Zby9 iuKR7UEZibWk,1Bf,pB,UoCnq0OHI,tY1QBhXbvQ73bq 9B

            Popular posts from this blog

            Monofisismo

            Angular Downloading a file using contenturl with Basic Authentication

            Olmecas