I want to moniter cpu usage of some java application. I don't want to use tools like jconsole (JMX)
if there is any way to check by java code?
Use JavaSysMon
Currently it reports:
Also you can use jmx mbeans or get PID using Runtime.exec() and using that call platform-specific command like ps.
psor reading/proc/{pid}if you have Linux.