How to use java jdbc in password mode?

Hello,my database is runing in secure mode(Version 2.0),I can use the CA authentication login to the database, but using user/password mode always gives an error, please give me an example.
Thanks a lot!

Hey @Jason, this might help: https://github.com/cockroachdb/cockroach/issues/22537#issuecomment-364425557

If not, can you provide the steps you’re taking to authenticate and the error you’re receiving?

Thanks @tim-o.
The problem has been solved, is the version problem of java.