Java; terminal with ANSI colors in Windows, Linux & IntelliJ

I've run into this problem more times than I’d like, always having to retrace my steps to get things working again; so I’m putting this online as a reference.