Type in
java -version
This will tell you if java is working and if so what version. Not all versions work with openhab so best to post or check against the documentation under manual install steps for linux.
Also if you do not have a UPS and have taken no steps to mitigate data corruption then a fresh install is the way to go, if corruption has occured in your boot/running files of linux then no amount of reinstalling openhab is going to fix it.
It is handy having a backup file you can re-load onto your SD card, so worth reading this guide so it does not happen to you again…