If you copy those squares over to https://www.babelstone.co.uk/Unicode/whatisit.html and hit 'Identify' and you see the correct output then that means its a font issue. That means your chosen font inside of Netbeans does not support the glyphs 'ñ' and 'â' and that the font fallbacks are not configured accordingly. Please see the first mail on how to adress this.
If these do not show up correctly, then you have to play around with file.encoding and sun.stdout.encoding. Please note that Netbeans 14 does not check for sun.stdout.encoding correctly, please use the test build for 15rc1: https://ci-builds.apache.org/job/Netbeans/job/netbeans-TLP/job/netbeans/job/release150/6/artifact/dist/netbeans/netbeans-15-rc1-bin.zip If your fonts support 'ñ' and 'â' running with sun.stdout.encoding=utf-8 and file.encoding=utf-8 should work. Please note that Netbeans as well as your Project and Maven all need to be launched with these. Best wishes, Bing