Hello Ayush Shrivastava,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that you have an Operating system error code 5(Access is denied.) while running bulk insert query using JDBC.
This error could happen to any executable file not because it's Azure SQL query or Azure Blob storage, it is a permission issue. You can use your SQL Server service account that have rwx to run the query, and make sure SQL Server has access to the entire folder as well as checking that firewall setting is not blocking access to the file.
The links below will guide you for similar question and more details:
- https://sqlbak.com/blog/cannot-bulk-load-because-the-file-could-not-be-opened-operating-system-error-code-5-access-is-denied
- https://stackoverflow.com/questions/14555262/cannot-bulk-load-operating-system-error-code-5-access-is-denied
- https://learn.microsoft.com/en-us/answers/questions/124104/cannot-bulk-load-because-the-file-sqlfiles-csv-cou
I hope this is helpful! Do not hesitate to let me know if you have any other questions.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful