or any other way to get user pc memory by servlet
1 person found this helpful
You can't. If you want information about a client machine, that client machine needs to SEND it to you somehow which will likely require some application to run on that client machine.
And note that those methods you mention return information about the Java virtual machine's memory pool, not of the entire system.
"Returns the amount of free memory in the Java Virtual Machine."
so the following is return server or client JVM?
long maxMemory = runtime.maxMemory();
long allocatedMemory = runtime.totalMemory();
long freeMemory = runtime.freeMemory();