Simply execute the driver and it will tell you:
Note: Oracle should support off-by-one major database version. So drivers version Oracle 11.2.0.4
should be able connect to 10g, 11g, 12c (at least 12.1).
$ java -jar ojdbc6.jar
Oracle 11.2.0.4.0 JDBC 4.0 compiled with JDK6 on Thu_Jul_03_18:17:32_PDT_2014
#Default Connection Properties Resource
#Mon Jun 10 20:13:06 CEST 2019
$ java -jar ojdbc8.jar
Oracle 12.2.0.1.0 JDBC 4.2 compiled with javac 1.8.0_91 on Tue_Dec_13_06:08:31_PST_2016
#Default Connection Properties Resource
#Mon Jun 10 20:13:17 CEST 2019
***** JCE UNLIMITED STRENGTH IS INSTALLED ****
If you have problems connecting using old JDBC drivers you can set SQLNET.ALLOWED_LOGON_VERSION in server's sqlnet.ora. This might work but also you have to deal with supported password formats on DB side. See ALLOWED_LOGON_VERSION. If you do not have user's password stored in the database in proper format, user will not be able to authenticate anyway.
ALLOWED_LOGON_VERSION_SERVER
parameter also relates to format how passwords are saved. And also what types of password hashes are generated when you change the password. IMHO You should avoid storing passwords in original 10g format. You can get user password hash details by using this SQL:
SQL> select username, PASSWORD_VERSIONS from dba_users;
USERNAME PASSWORD_VERSIONS
------------------------------ -----------------
SYS 10G 11G 12C