I tried to debug a java processes which is executing automatically during the night. I am tried to enable the core dump for the thread, processes and get the java class which is getting executed automatically.

Please let me know what is the way i can debug a java processes and also please let me know how to enable the kernel core, thread dump and how to debug the dump.

I looked around but i could not find any firm answers as to how to debug java process or the steps to enable a core dump so that i can create a dump for the processes and try to debug that.

Any help on this would be greatly appreciated. Thanks a lot for your help.