The instructions in section 1.2.1 of the STM32CubeProgrammer software description worked for me.
I installed openjdk-8
sudo apt install openjdk-8-jre-headless
I set selected java-8 as my default run time engine
sudo update-alternatives --config java
and installed the following packages
sudo apt purge openjfx
sudo apt install openjfx=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2
sudo apt-mark hold openjfx libopenjfx-jni libopenjfx-java
Then I installed the STM32CubeProgrammer as I had done earlier
sudo ./SetupSTM32CubeProgrammer-2.2.1.linux
The last page of the installation procedure mentioned the path to the program files. The following path now leads to the program files on my system
/usr/local/STMicroelectronics/STM32Cube/STM32CubeProgrammer/
The program can be launched using
sudo /usr/local/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/./STM32CubeProgrammer