Actually there is a certain similarity to global variables - you could use system properties, setting them in one class and reading them in another class. This is actually quite common for rather complex enterprise environments. JBoss for instance routinely provides a mechanism to define and access system properties.