java - How to access static variable of another program -


i want make 2 programs. program 1 have static collection , getter/setter access/update values.

i want program 2 should able access/call getter/setter of program1. static collection can shared among many programs/process

*i dont want engage port.

you can't declare variable static (or super-static) , expect available in code outside of program - doesn't work way. need sort of inter-process communication, , possibilities endless. name few: - serialize / deserialize , file (local or on network) - sockets (basically, open network connection between 2 ports on localhost) - database - shared memory (whether possible depends on os) os of choice may offer other means, principle remains same: whenever variable changes, 1 application needs notify other.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -