Reading property file from java code while connecting to Kafka

We have a package structure - something like this -

 - war
 - service-jar

We have our .jks file in the resources folder of the service-jar. While setting the configuration properties for Kafka, we have the following lines of code,

configProperties.put(SslConfigs.SSL_TRUSTSTORE_LOCATION_CONFIG, "/context-root/name-of-file.jks");

While trying to connect to the server, we are facing an issue saying that the file has not been found. However, in my local machine, when I hardcode the path (\user\User1\...\name-of-file.jks) it works. Can someone suggest how we should be specifying the file name?

We are running this application on jboss and cloud - I can't create the file on the server.