antlr4 icon indicating copy to clipboard operation
antlr4 copied to clipboard

Warning "WARNING: Secure coding is automatically enabled for restorable state!" when running "Hello.g4" from book on macOS 14

Open corneliusroemer opened this issue 1 year ago • 1 comments

I'm following the ANTLR4 Reference and have set up antlr with brew install antlr and a classpath of:

export CLASSPATH=".:/opt/homebrew/Cellar/antlr/4.13.1/antlr-4.13.1-complete.jar"

When running TestRig with the grun -gui option: grun Hello r -gui as suggested on page 7, I get a GUI, but I also get a warning on the command line:

$ grun Hello r -gui 
hello parrt
2023-12-19 00:58:56.847 java[45676:1875683] WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.
^C% 

I don't think this warning: WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:. is due to anything I have done given I'm following the basic hello world. It would be good if the warning was resolved so as not to distract the user.

I'm on macOS 14.2 (ARM), using javac 21.0.1.

corneliusroemer avatar Dec 19 '23 00:12 corneliusroemer

See this answer: https://stackoverflow.com/a/77320845/97627

The "developer" in this case is Java, so you'll need an updated version of Java that does this.

pwagland avatar Feb 14 '24 13:02 pwagland