Search code examples
javaoptimizationshared-memoryramread-write

Write data directly to RAM in Java, and then read it?


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:

  1. I want to attempt to have on app write data to RAM and another to read that same data from RAM.
  2. I want to known because in the near future I will have to optimize a java application.

Solution

  • 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.