You are correct that the folder structure has changed from R2018b forward.
In general, the best practice to use when referencing files included in the CTF is to use just the filename, as all files that you include with your application are added to your application's path. However, in cases where this is not possible (e.g. you need to specify a full file path as a function argument), you can do the following:
Use the which function to locate your desired JDBC file on the MATLAB path. For instance, if you include the 'mysql-connector-java-8.0.20.jar' file in your compiled application, you can find the full file path in your compiled application by executing:
>> driverPath = which('mysql-connector-java-8.0.20.jar');
You can then pass the resulting driverPath variable as an input to the setConnectionOptions function.


