Hi Gurav,
Please explain more about what you are trying to authenticate. Are you authenticating to the switch? Or is this the user that plugs into a switch port and needs to be authenticated? If its the latter then you need to configure dot1x authentication and this only uses RADIUS and not TACACS. I am unclear on what you mean by java client library-
If the user needs to authenticate on a switch port (dot1x) then he needs a dot1x supplicant to do this - Cisco's supplicant is the CSSC-Cisco secure services client.
Thankyou,
Anita