Question: Usually we can get data using ODBC connector in Power BI. Is there any way to get the data using the JDBC connector?

Answer: 
Unfortunately there is no native support for JDBC. 

You can upvote the feature request for JDBC [at this link](https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/7262643-support-jdbc-data-sources)

There are options that convert your JDBC connection in to an ODBC one, known as JDBC to ODBC bridges. [Oracle has one](https://download.oracle.com/otn_hosted_doc/jdeveloper/904preview/jdk14doc/docs/guide/jdbc/getstart/bridge.doc.html) and [here is a Progress option](https://www.progress.com/tutorials/jdbc/use-your-custom-jdbc-driver-with-microsoft-power-bi). Once configured you can then use the PowerBI ODBC connector.
Since Power BI is not coded in java its not easy to support JDBC (you will see only ODBC or .net based connectors in PBI). If Microsoft ever wants to add support for JAVA in Power BI then they might have to do via some sort of bridge.

If you are open for 3rd party solution then [here is one option by ZappySys](https://zappysys.com/api/integration-hub/jdbc-connector/power-bi)

This same problem happens in many non java apps like Excel, MS Access, Informatica PowerCenter they all are not coded in JAVA so cant support loading java libs / runtime.