Install libpostgis-java by entering the following commands in the terminal:
sudo apt update sudo apt install libpostgis-java
Geographic objects support for PostgreSQL -- JDBC support
PostGIS adds support for geographic objects to the PostgreSQL object-relational database. In effect, PostGIS "spatially enables" the PostgreSQL server, allowing it to be used as a backend spatial database for geographic information systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS follows the OpenGIS "Simple Features Specification for SQL". . This package contains JDBC support for PostGIS.