Results 1 to 5 of 5

Thread: How to run a jar file? Please help

Hybrid View

  1. #1
    Join Date
    May 2010
    Beans
    11

    How to run a jar file? Please help

    Hi guys,

    I am trying to run a jar file which is under /home/paddywang/Downloads
    I have installed java on my machine, so I tried to use command
    java -jar theFile.jar
    But I got "the Unable to access jarfile" .
    Please help!

    Thanks

  2. #2
    Join Date
    Mar 2009
    Location
    /dev/null/
    Beans
    109
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: How to run a jar file? Please help

    just troubleshooting here.

    did you set the permission so the file can run as a program?
    Code:
    int getRandomNumber()
      return 4; //Chosen by dice roll 
               //Guaranteed to be random.
    XKCD

  3. #3
    Join Date
    May 2010
    Beans
    11

    Re: How to run a jar file? Please help

    I am quite new to Linux. How to set permission so I can run the jar file as a program?

  4. #4
    Join Date
    Jun 2006
    Beans
    12

    Re: How to run a jar file? Please help

    it sounds like you are in the wrong directory when you execute the command, or that the jar file is not where you think it is. try ls from the shell to see the file listing. also you can try sudo chmod +x yourjar.jar to give it execution permission to the file.

  5. #5
    Join Date
    May 2010
    Beans
    11

    Re: How to run a jar file? Please help

    Thanks a lot. It is working now.

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
  •