I known this probably goes against lots of general rules in programming, but how would you do this? There are two reasons why I am asking this:
Java is not able to read/write to an arbitrary position in the RAM.
If you want to share data between different applications, I recommend using a file or a database.