The application "STS" can't be opened
Asked Answered
M

2

13

The first installation of STS on my Mac works fine, and this error pops up after restarting the computer. The problem with stS4-4.13.1 installed is still the same. Attempting to specify the jdk version in the ~/Application/STS/Info.list file also does not work. PS:MacOs Monterey Below is the error message, please help me enter image description here

Misdoing answered 19/2, 2022 at 10:2 Comment(0)
I
73

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 definitely the case.

NOTE: If you have Lombok installed, you have to re-sign it too before signing STS app:

sudo codesign --force --sign - /Applications/SpringToolSuite4.app/Contents/Eclipse/lombok.jar

Inappropriate answered 28/2, 2022 at 15:11 Comment(1)
Do we need to do this everytime we want to open STS?Lindyline
B
3

Also if you have Lombok installed you have to sign it too before signing the STS app:

sudo codesign --force --sign -  /Applications/SpringToolSuite4.app/Contents/Eclipse/lombok.jar

Afterward applied vnagy solution

Beadsman answered 15/3, 2023 at 3:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.