Forums > Java

MAX global variable in JAVA

Feb 28 2014 | 9:58 am

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 | 2: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 | 1:20 pm

Assuming your classes are being loaded by the same classloader, you can share statics:

Mar 03 2014 | 3: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…

Viewing 4 posts - 1 through 4 (of 4 total)

Forums > Java