I have a maven java ee application
Path to the file is
~/Work/appname/WebContent/resources/json/menu.json
After deploying on glassfish file located here:
~/Tools/glassfish4/glassfish/domains/domain1/applications/appname/resources/json/menu.json
In this file stores menu in json format.
I need to do basic crud (create, read, update, delete) operations with this file.
I've tried to get file like this:
InputStream inputStream = ModulMenuUtil.class.getClassLoader().getResourceAsStream("/menu.json");
I get a NullPointerException. I don't know how to get path to this file. Please help me.