that's right.. try out the System.out.println(globalVariable); and let me know if it doesn't work..
I'm pretty sure that it works if you access through the kcontext. doing something like:
kcontext.getKnowledgeRuntime.getGlobal("globalVariable");
Greetings.