MAX global variable in JAVA


    Feb 28 2014 | 5:58 pm
    In MAX Javascript there is a functionality for storing global variables like this:
    glob = new Global(“bounce”);
    glob.starttime = 500;
    Are there any similar arrangements for globals in JAVA?

    • Feb 28 2014 | 10:00 pm
      don't think so. quick scan of the mxj docs doesn't show anything obvious. the two languages are integrated at different levels with js being integrated in a tighter way than java (hence the ability to script etc through js) whereas java runs in a jvm and only has a bridge connecting them
    • Mar 03 2014 | 9:20 pm
      Assuming your classes are being loaded by the same classloader, you can share statics:
    • Mar 03 2014 | 11:27 pm
      good point... I was thinking the OP wanted to also be able to access it from MAX, but I appear to have invented that bit...