Question: Where Should I Put Jar Files in Linux?
Contents

IF you are using the packing system, then a good choice is indeed /usr/share/java/ or /usr/lib (if your app is called from /usr/bin or /usr/sbin). Another good choice would be inside /usr/local, only if this app of yours is host specific.

Where do I put .jar files?

The best way is to add the jar to your project is as follows:

  1. Create a folder called lib in your project folder.
  2. copy all the jar files you need to this folder .
  3. Refresh your project in eclipse.
  4. Select all the jar files, then right click on one of them and select Build Path -> Add to Build Path.

How do I run a .jar file in Linux?

Show activity on this post.

  1. Open a command prompt with CTRL + ALT + T.
  2. Go to your “.jar” file directory. If your Ubuntu version / flavour supports it, you should be able to right click on your “.jar” file’s directory and click “Open in Terminal”
  3. Type the following command: java -jar jarfilename.jar.

6 февр. 2012 г.

David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest