[ale] Should JAR files go in lib or share?

Chris Fowler cfowler at outpostsentinel.com
Tue Nov 3 16:46:30 EST 2020


You can cheat with J2EE and just create a WAR file.  Put in share.  I contain all your compile class code, HTML, images, XML, etc.  Can even contain that specific version of mysql-connector-java.jar.

Right now, I'm dealing with a WEB-INF directory that has many jar files of forgotten source.    This is a vote against placing mysql-connector-java.jar in the WAR because 15 years down the road we've forgotten would've forgotten where we got that file.

It really does not matter if its lib or share.  The question is more like: "Where would it go under FHS rules?"
________________________________
From: Jim Kinney <jim.kinney at gmail.com>
Sent: Tuesday, November 3, 2020 4:26 PM
To: Chris Fowler <cfowler at outpostsentinel.com>; Atlanta Linux Enthusiasts <ale at ale.org>
Subject: Re: [ale] Should JAR files go in lib or share?

It makes sense to unwrap from different locations yet its a pain. If the lib is unique to the application, it shouldn't be in a lib folder for others to (ab)use.

If containers were easier track changes within, I'd say toss it in.

On November 3, 2020 2:56:36 PM EST, Chris Fowler <cfowler at outpostsentinel.com> wrote:
I think share for something like a J2EE application is fine.  There are XML files, images, HTML, etc.   Dependencies like mysql-connector-java should be in lib.

________________________________
From: Jim Kinney <jim.kinney at gmail.com>
Sent: Tuesday, November 3, 2020 2:45 PM
To: Chris Fowler <cfowler at outpostsentinel.com>; Atlanta Linux Enthusiasts <ale at ale.org>
Subject: Re: [ale] Should JAR files go in lib or share?

Quack!

Use a lib concept. The alternative method is when it's a large application with lib and logics and it goes in share.

On November 3, 2020 1:51:56 PM EST, Chris Fowler via Ale <ale at ale.org> wrote:
I was having a discussion with a developer this morning about my choice to put our JAR files in lib and since they are technically libraries should be there, but when going after another JAR file I noticed Ubuntu uses share. lib.

I noticed that CentOS and Ubuntu have different ideas too.

CentOS places the actual file in lib and a symlink in share.

[DEVEL libxalan-java]$ ls -l /usr/share/java/jna.jar
lrwxrwxrwx. 1 root root 22 Nov  8  2019 /usr/share/java/jna.jar -> ../../lib/java/jna.jar

Ubuntu puts the jar in share:
chris at mechonis:~/Downloads$ ls -l /usr/share/java/js.jar
lrwxrwxrwx 1 root root 14 Jan 20  2017 /usr/share/java/js.jar -> js-1.7.7.1.jar

I'm going with lib because the nature of these files aare that they are "libarires" that get loaded, executed, and are an API.  They look like a libXXXX.so and quack like a libXXXX.so.




--
Computers amplify human error
Super computers are really cool
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.ale.org/pipermail/ale/attachments/20201103/621ffa56/attachment.html>


More information about the Ale mailing list