I’m not sure what your timetable is on this project, but you may wish to experiment a little. You’ll likely need some tools to help you guage what’s going on inside the “black box” JVM.
Here’s a good crash course on how java handles memory usage: http://www.juhonkoti.net/2010/10/19/crash-course-to-java-jvm-memory-issues-to-sy sadmins
Also, instead of doing the console messages like in that link, i’d suggest checking into JVisualVM that comes packaged with oracle’s jdk. It’s a free profiler, it’s not as full featured as something like JProfiler, but for being free, there’s some good info to be had. From a profiler you can watch your memory usage, etc, and figure out if you have a bottleneck and should increase memory available to the jvm, etc.
There’s also specialized JVM’s besided oracle’s offering that are designed for massive java programs - may be way overkill – Azule Systems makes bare-metal jvm’s that can scale to terabytes of ram and hundreds of cpu cores, IBM makes a JVM that can run at scale but isn’t bare metal (install on regular linux box), etc. I’m not saying you need something like these to do what you’re doing – just pointing out that there are solutions to scale java softawre to the moon and back if needed.
so basically the point is, you can make this work – it may just take some experimenting and time to understand how java works at scale. good luck! … actually sounds like a fun adventure