Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: How to run a Java / .jar file automatically?

Hybrid View

  1. #1
    Join Date
    Feb 2013
    Location
    Idaho, USA
    Posts
    18

    Default How to run a Java / .jar file automatically?

    Hi Everyone! I need some help.

    I just downloaded a program called Oulook Messenger that my family uses to communicate. The program uses Java to run on Linux machines and I would like it to start automatically with my computer. I can run it by going to to folder, opening the terminal there, and typing in:
    Code:
    java -jar OutlookMessenger.jar
    However when I close the terminal, Outlook Messenger closes too. Is there a way to open this when my computer starts without having the terminal open? Thanks!

  2. #2

    Default Re: How to run a Java / .jar?

    Ham Radio wrote:
    > i have tried typing in
    > Code:
    > --------------------
    > java -jar OutlookMessenger.jar
    > --------------------
    > but that doesn't work.
    >
    > Any ideas? Thanks!


    Well the first idea might be that you post the error message you got?

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,855

    Default Re: How to run a Java / .jar file automatically?

    You forhot to tell:
    a) which level of openSUSE you use;
    b) which desktop you use.

    When you say " when my computer starts", do you mean on boot (thus without anybody loged in), or on login of a certain user. In the first case it is a system thing (should go in boot.local or the like), for the second case it should go into the autostart of the user's desktop.
    Henk van Velden

  4. #4
    Join Date
    Feb 2013
    Location
    Idaho, USA
    Posts
    18

    Default Re: How to run a Java / .jar file automatically?

    Quote Originally Posted by hcvv View Post
    You forhot to tell:
    a) which level of openSUSE you use;
    b) which desktop you use.

    When you say " when my computer starts", do you mean on boot (thus without anybody loged in), or on login of a certain user. In the first case it is a system thing (should go in boot.local or the like), for the second case it should go into the autostart of the user's desktop.
    You are so right! Sorry about that. I just installed openSUSE last night, so I am kinda new to it

    I am running openSUSE 12.2 with KDE 4.9.5.

    So if I go into the autostart, (Not really sure where that is) and choose it to start, will it start like it should with java, or just the archive manager?

  5. #5

    Default Re: How to run a Java / .jar file automatically?

    hcvv wrote:
    > You forhot to tell:
    > a) which level of openSUSE you use;
    > b) which desktop you use.
    >
    > When you say " when my computer starts",


    There seems to be some problem here. The OP didn't say " when my
    computer starts"! Is this some bug in the forum/nntp software?

    > do you mean on boot (thus
    > without anybody loged in), or on login of a certain user. In the first
    > case it is a system thing (should go in boot.local or the like), for the
    > second case it should go into the autostart of the user's desktop.
    >
    >


  6. #6
    dd NNTP User

    Default missing words, forum/nntp software bug?

    On 02/21/2013 11:52 AM, Dave Howorth wrote:
    > There seems to be some problem here. The OP didn't say " when my
    > computer starts"! Is this some bug in the forum/nntp software?


    this question should be in the appropriate forum, but i'll answer
    here and a mod can decided to move this sub-thread if they wish:

    yes and no!

    it is a bug in that the forum/nntp hookup allows the text to flow to
    the nntp side while the http user is still in the process of editing
    the post..

    no it is not be a 'bug' because it has been that way for _years_ and
    won't be changed because the http user _must_ (apparently) be able to
    press Post and still change text for some seconds/minutes..

    because delivering complete/correct posts to the nntp side is
    secondary....everything to do with the nntp side is secondary.


    --
    dd
    openSUSE®, the "German Engineered Automobile" of operating system.

  7. #7
    Join Date
    Feb 2013
    Location
    Idaho, USA
    Posts
    18

    Default Re: How to run a Java / .jar file automatically?

    Thanks for all the advice guys.

    I am using OpenJDK

    So I open the terminal up where my .jar file is, and type this:

    Code:
    java -jar OutlookMessenger.jar
    Outlook Messenger then opens, but I have to keep the terminal open too. Is there a way to open Outlook Messenger without using the terminal so that when I double click on the file it just opens? I found the way to make it startup in Linux Mint KDE automatically, but it still doesn't work in openSUSE, because I need to have the correct application in the "Application Preference Order".

  8. #8
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: How to run a Java / .jar file automatically?

    On 2013-03-04 03:16, Ham Radio wrote:
    > Code:
    > --------------------
    > java -jar OutlookMessenger.jar
    > --------------------
    >
    >
    > Outlook Messenger then opens, but I have to keep the terminal open too.
    > Is there a way to open Outlook Messenger without using the terminal so
    > that when I double click on the file it just opens?


    You can, for example, press alt-f2, that usually opens a small dialog to
    type a command, and type your text in there. It usually has an history
    to retrieve what you typed yesterday.

    Desktops usually also have methods to create icons so that when you
    click on them the run whatever you want. I do not normally use that
    method and I don't know what desktop you use, so I will not give more
    details.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4, with Evergreen, x86_64 "Celadon" (Minas Tirith))

  9. #9
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,499
    Blog Entries
    15

    Default Re: How to run a Java / .jar file automatically?

    On Mon 04 Mar 2013 02:16:01 AM CST, Ham Radio wrote:


    Thanks for all the advice guys.

    I am using OpenJDK

    So I open the terminal up where my .jar file is, and type this:


    Code:
    --------------------
    java -jar OutlookMessenger.jar
    --------------------


    Outlook Messenger then opens, but I have to keep the terminal open too.
    Is there a way to open Outlook Messenger without using the terminal so
    that when I double click on the file it just opens? I found the way to
    make it startup in Linux Mint KDE automatically, but it still doesn't
    work in openSUSE, because I need to have the correct application in the
    "Application Preference Order".


    Hi
    Just create a script (eg called start_OutlookMessenger) to run it from
    you home bin directory and background it
    Code:
    #!/bin/bash
    cd /some/path/to/your/jar/file
    /usr/bin/java -jar OutlookMessenger.jar &
    Then make it executable;
    Code:
    chmod 700 ~/bin/start_OutlookMessenger
    start_OutlookMessenger
    --
    Cheers Malcolm °¿° (Linux Counter #276890)
    openSUSE 12.2 (x86_64) Kernel 3.4.28-2.20-desktop
    up 6 days 23:57, 3 users, load average: 0.04, 0.11, 0.13
    CPU Intel® i5 CPU M520@2.40GHz | GPU Intel® Ironlake Mobile


  10. #10
    Join Date
    May 2010
    Location
    Space Colony Lagrange Point 22° à, 77° Ƅ, 56° ɤ, 99° ɜ
    Posts
    3,166

    Default Re: How to run a Java / .jar file automatically?

    Quote Originally Posted by Ham_Radio View Post
    Hi Everyone! I need some help.

    I just downloaded a program called Oulook Messenger that my family uses to communicate. The program uses Java to run on Linux machines and I would like it to start automatically with my computer. I can run it by going to to folder, opening the terminal there, and typing in:
    Code:
    java -jar OutlookMessenger.jar
    However when I close the terminal, Outlook Messenger closes too. Is there a way to open this when my computer starts without having the terminal open? Thanks!
    press alt+f2 and then type in java -jar /home/<fullpath>/abc.jar
    GNOME Version 3.20.2
    openSUSE Leap 42.3 64-bit

    www.vazhavandan.blogspot.com

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •