I want to monitor the memory usage and threading, how can I do on the Eclipse or JVM? Thanks.
You can try jvisualvm.exe You can find it in jdk/bin directory. It's great tool. Read here on the usage of it.
jvisualvm.exe
If you want to get the status in your java code, you can try JMX. Google the keywords "JMX Monitoring and Management".