In the context of adding capabilities to BaseX,I can see some information about a package:

nicholas@mordor:~$ apt show basex
Package: basex
Version: 9.0.1+ds-1
Priority: optional
Section: universe/database
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Alexander Holupirek <alex@holupirek.de>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 4,059 kB
Depends: java-wrappers, default-jre | java8-runtime
Recommends: libjline2-java
Suggests: libtagsoup-java, libxml-commons-resolver1.1-java, libjing-java
Homepage: http://basex.org
Download-Size: 3,611 kB
APT-Manual-Installed: yes
APT-Sources: http://ca.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
Description: XML database and XPath/XQuery processor
 BaseX is a very fast and light-weight, yet powerful XML database and
 XPath/XQuery processor, including support for the latest W3C Full Text and
 Update Recommendations. It supports large XML instances and offers a highly
 interactive front-end (basexgui). Apart from two local standalone modes, BaseX
 offers a client/server architecture.
 The package provides following commands:
  * basex  ..........  Standalone local XML database. Command line interface.
  * basexgui  .......  Standalone local XML database. Graphical user interface.
  * basexserver  ....  BaseX XML Database Server.
  * basexclient  ....  BaseX XML Database Client.
 BaseX XML database and XPath/XQuery processor


but how do I find out more, such as where the lib directory is for BaseX?

nicholas@mordor:~$ dpkg -L basex

Yet, I'm looking the lib directory to BaseX itself.


The lib directory can be found in the full distributions of BaseX, which can be downloaded from the official homepage. See Startup: Full Distributions for more information.


I don't think basex has any lib content, just the bin.

dpkg -L basex does not return anything in the lib directory, so it's certainly not in the basex package. It could be in basex-dev or something similar, but when I look for that I find:

$ apt search basex
Sorting... Done
Full Text Search... Done
basex/testing,testing 9.0.1+ds-1 all
  XML database and XPath/XQuery processor

lua-basexx/testing,testing 0.3-2 all
  baseXX encoding/decoding library for Lua

If I look at the contents of lua-basexx, I also see nothing in lib:

$ apt-file list lua-basexx
lua-basexx: /usr/share/doc/lua-basexx/changelog.Debian.gz
lua-basexx: /usr/share/doc/lua-basexx/copyright
lua-basexx: /usr/share/lua/5.1/basexx.lua
lua-basexx: /usr/share/lua/5.2/basexx.lua

Our last option is to search for libbasex.so:

$ apt-file search libbasex

This returns nothing, so there is no file starting with libbasex in the debian archive.

  • BaseX is a Java program, so it typically wouldn’t use a libbasex.so library. apt-file search matches anywhere in a file’s path, not just at the start — see apt-file search man5/s for example. – Stephen Kitt Nov 23 '20 at 7:59
  • I'm confused, because I'm trying to find "where" to add JAR files for BaseX to pickup. Apparently, that's the "lib" folder for the db itself. – Nicholas Saunders Nov 23 '20 at 8:17

dpkg -L lists all the files shipped in a given package; to get a full picture of the changes made to the system, you’d also have to look at the package’s maintainer scripts, but basex doesn’t have any.

BaseX is a Java program, so its libraries aren’t in lib... files; they are provided as JARs, shipped in /usr/share/maven-repo (which is structured as a Maven repository), and linked in /usr/share/java. The BaseX “library” (which also contains all the BaseX applications) is /usr/share/maven-repo/org/basex/basex/9.0.1/basex-9.0.1.jar.

I’m not sure the packaged version of BaseX will load JARs automatically from any given directory, but you can always add JARs to the classpath; see this answer for details.

  • Right, but, to add JAR files for the db to pick-up, there's "a" lib directory. Or so is my understanding. – Nicholas Saunders Nov 23 '20 at 8:18
  • 1
    Are you referring to this feature? – Stephen Kitt Nov 23 '20 at 8:39
  • stackoverflow.com/q/64011435/4531180 so possibly that feature. The JAR for JDBC would have to go somewhere. I was expecting a "lib" folder. I added the above link to the question for context. – Nicholas Saunders Nov 23 '20 at 9:23
  • 1
    OK, I’ve answered that part of your question there. – Stephen Kitt Nov 23 '20 at 9:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.