Not able to connect to the database

I am trying to invoke database through java code in eclipse. I have provided few parameters in run as configurations but getting below error while running it.

com.inet.tds.av: Msg 4060, Level 11, State 1, Line 1, Sqlstate 01000
Cannot open database "indexdelivery" requested by the login. The login failed.

I have checked the credentials, they are correct. I am using sql server
Please help

What user is your java app running as?