It wil be difficult and depends to the application, JVM implementation and OS.
If you have no system partitioning the JVM might take 100% CPU.
RAM depends to the OS and the used 32/64JVM.
With 32Bit Windows you are restricted to ~2GB
In case of 64Bit Unix the JVM might accept ~3,6GB Heap setting (depends on the OS) witch is about 4GB in total.
The RAM usage is an addition of Heap(-Xmx) PermGenSpace (-XX:MaxPermSize) and the reserved area for Threads.
If I understanbd correctly, you want the system performance information that you can get from tools like top on Linux and Task Manager on Windows. There is no built-in API to do this. But some googling found the following link which might help:
I figured it, out Use Python 2.7, Install it on windows and linux, Use java class to call python file which can collect System information.