Java MySQL Connection on the FreePBX Server PC

To add the Paging or Intercom extension, I just insert data into following tables

Paging_config and Paging_groups

To add Paging extension, I just enter into the MySQL and give the insert query on the same PC, which has the FreePBX and Asterisk.

Is it possible to make MySQL Connection through Java application, on the SAME PC ? I need to insert data via my application.