My understanding is that Java is platform-independent, so it does not matter whether you use it on a Ubuntu, other Linux distro, or Windows machine. I use automated trading in which my own program is written in Java. The computer uses Ubuntu as operating system and I am using IB's Gateway (not TWS) and API tools.
For simple TWS/API trading, it shouldn't matter if it's windows or linux. There are other good reasons on why to deploy automated systems on linux but Java is irrelevant.
Didn't say "best". But it works quite well, yes. Well enough that there is no reason to fear trading on a Ubuntu box. "Best" is not a claim that I would be competent or experienced enough to defend, TBH.
My vote is for Python and TWS on docker. I've got it running pretty smoothly now and the only issues I've had are the hosting company rebooting the machine for processor updates.
The API is mature enough for my needs. And I don't use TWS, only Gateway. I haven't had major issues with it over the last 3 years or so.
Simply put: Gateway is TWS without the graphic user interface. I don't need the user interface for automated trading, only the connection from my computer to IB's servers. Gateway performs this function. As it does not have a GUI, does it use much less memory on my computer (plus lower CPU load).
Yes. I also use IBController (https://github.com/IbcAlpha/IBC) to keep Gateway up and running the whole week. I start this combination on Sunday evening and let it run the whole week until Saturday morning. During the week I only do some monitoring of log files to see how things are going. I am able to interfere with my program, but hardly ever do that.