Thanks for your answer. Unfortunately I could not get it to work on Mac OS X…
First I was a struggle to set the environment variable correctly. As it is easy under Linux and Windows, it’s really hard under OS X. After a while I found this https://github.com/ersiner/osx-env-sync and that helped me a lot to get the environment variable set correctly.
Next I gave it a try and put some test script (echo-ing the parameters) in a script called by the script in the environment variable. The first should open a terminal and show the parameters. In the end of course it should start Tomact (startup.sh or catalina.sh in /deploy/tomcat/bin). But while the environment variable was set, it didn’t make any difference. Tomcat was started as usual by Cuba Studio.
For me though it’s not a big deal anymore since I discovered that the console output is written to /deploy/tomcat/logs/catalina.out.
So when debugging/developing while using the good old System.out.println to show me the values of certain variables, I can do so on my Mac too. I just will fire up a terminal and the tail command:
tail -f <project>/deploy/tomcat/logs/catalina.out.
That works fine for what I want to achieve.
I hope this reply is still useful for someone, whether searching for how to set an environment variable on Mac OSX or a way to see the values printed to the console by System.out.println or alike.