I am able to get the name of printer which I had installed previously on my PC.But now its not physically connected to my pc. How should I check it first before moving to Print(
Take a look at the javax.print API. A good starting point would be PrintServiceLookup.