Find the answer to your Linux question:
Results 1 to 2 of 2
Hi All, I am created a executable jar file in windows.when I clicks on that file it will execute and do my task.I just copied the same file into Linux ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2006
    Posts
    19

    executing jar files


    Hi All,
    I am created a executable jar file in windows.when I clicks on that file it will execute and do my task.I just copied the same file into Linux os and try todo the same thing.But when I click on that file its just unzipping and showing the files.Then I created a executable jar file in Linux itself and try todo the same thing I faced the same problem.How to make it execute when I click on that jar file?the same file executing using
    java -jar test.jar.

    I want that it should run when I clicks on that jar file.

  2. #2
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,630
    Just guessing here since I don't really know much about jar files and can only approach it from the point of what I would do if I couldn't get a java app to run. The first thing I'd assume is that java wasn't in my path. There are a couple of ways to address this but I usually just create a symlink between where java is to /usr/bin. If I'm remembering correctly, in FC/Redhat, your java directory is in /usr/lib, can't be sure though. Find the java executable in your java directory and as root, create the symlink. As an example, mine is in /usr/lib/java/bin/java so I'd make the symlink from it...
    Code:
    ln -s /usr/lib/java/bin/java /usr/bin/java
    ...then, try the jar file.

    Hope this helps. If not, sorry I couldn't help more...
    Linux Mint + IceWM Registered: #371367 New Members: click here

Posting Permissions

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