you can run sql (using jdbc) on the database system tables e.g. "DBA_OBJECTS" (req. admin users) which contains the metadata (related to function, procedure, tables etc).
Oracle System Tables are as; (Assuming you are using oracle database)
Oracle System Tables