I'm developing couple of applications using a java library (.jar). Both applications run fine in their own virtual machine and things are fine.
However, i'm assuming that the library (although is being shared) is being linked into the byte code (generated by the compiler) and there by increasing the memory overhead of the application.
Is there anyway to actually share this library in JRE (just like .so files in c,c++)?
Is it possible that linux's memory management scheme actually facilitates sharing? By loading the set of classes in a page and letting multiple process use the same page (by updating the respective page map tables)?
I see IBM's implementation provides support for that (http://www.ibm.com/developerworks/library/j-ibmjava4/). I wonder why Oracle/Sun's version of VM doesn't support this and wonder why you think its might not be worth. The memory savings helps in embedded systems.
I didn't say I 'think it mightn't be worth it'. I said it's another question. Sun must have had a reason for not continuing with it. I don't know what it was, but I respect their judgement. Don't put words into my mouth.