Results 1 to 4 of 4

Thread: Launcher to .jar file?

  1. #1
    Join Date
    Jul 2006
    Beans
    Hidden!

    Launcher to .jar file?

    I have this file
    AlienFXLite-0.4b.jar

    in this directory
    /home/laura/AlienFX

    that I open/run with this command
    sudo java -jar AlienFXLite-0.4b.jar

    Instead of using the terminal every time, I'd like to make a launcher. How can I do this?

    I've tried...
    /home/AlienFX/ && gksudo java -jar AlienFXLite-0.4b.jar
    gksudo java -jar /home/laura/AlienFX/AlienFXLite-0.4b.jar

    And about 50 varients on those two lines. Heh. I'm stumped.

    Thanks for any help!

    -zami
    Last edited by zami; August 27th, 2010 at 01:39 AM. Reason: typos

  2. #2
    Join Date
    Jul 2007
    Location
    Poland
    Beans
    4,499
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Launcher to .jar file?

    what about gksu sh -c "java -jar /home/laura/AlienFX/AlienFXLite-0.4b.jar" ?

  3. #3
    Join Date
    Nov 2008
    Location
    Fortson, GA
    Beans
    1,008
    Distro
    Ubuntu Development Release

    Re: Launcher to .jar file?

    I would create a shell script which is what I think Vaphell was suggesting. To do that open your text editor and enter this:

    Code:
    /bin/bash
    
    gksudo java -jar /home/laura/AlienFX/AlienFXLite-0.4b.jar
    Then save (I would suggest naming it something starting with a . in your home folder so it will be hidden) and quit. Then just right-click on your menu and select "Edit Menus". Then just add it anywhere you want it on your menu.

    Oh, I almost forgot...you also have to make it executable. Navigate to wherever you saved it and right-click it. Select "Properties" and then the "Permissions" tab. Finally tick the box beside "Allow executing file as program". You should now be golden.
    -o)
    /\\
    _\_V
    Message void if penguin is violated...Don't mess with the penguin.

  4. #4
    Join Date
    Jul 2006
    Beans
    Hidden!

    Re: Launcher to .jar file?

    Well I finally put the entire .jar file into my home directory (just take the variables of slashes and home and my name out of the equation!) and then it opened just fine with

    gksu "java -jar AlienFXLite-0.4b.jar"

    Thanks for scooting me along the right path, all.

    -zami

Bookmarks

Posting Permissions

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