the smart card must do the signing on the card. The smart card manufacturer should provide an interface that you can use from Java, perhaps a PKCS11 interface, as well as some documentation on how to use it.
Nice to meet you.
Don't get me started about those stupid light bulbs.