But when I start program in the unix machine using JAVA classname command from PUTTY session it’s started running. As soon as I close the Putty session the program is terminated.
We are expecting the java program to run even after closing the PUTTY session.
This has nothing to do with Java. Unix will terminate your shell and its subprocesses when you terminate the connection.
Use background execution (someCommand &), fg and bg, or the program called screen that can give you sessions in virtual terminals. Or run your Java code as a service (jWrapper, YAJSW).