#You are most likely facing a long standing issue in which Eclipse modifies its package contents after being opened. This in turn breaks its own signature that is generated by the apple build system when the package is originally created. And in the end, this will prevent it from being opened next time, since macos thinks the package was tampered with...
#The solution is to re-sign your application:
sudo codesign --force --sign - /Applications/SpringToolSuite4.app
#If you want to you can first check if macos is indeed thinking that your package was tampered with this command:
codesign -v -vvv --deep /Applications/SpringToolSuite4.app
#If it returns something in the lines of:
/Applications/SpringToolSuite4.app: invalid Info.plist (plist or signature have been modified)
then this is definetly the case.