0

I have a file named upgradePagePromoCodeState.json under /common.

When I use a file path like this:

/work/xxx/app/src/main/webapp.war/common/upgradePagePromoCodeState.json

it's executed in local but not in stages. How can I give a path to work in stage an well as in local?

String filePath = "/work/xxx/app/src/main/webapp.war/common/upgradePagePromoCodeState.json";
try {
    String jsonText = new String(Files.readAllBytes(Paths.get(filePath)));
} catch (IOException e) {
    logger.log(Level.SEVERE, "Error while pasing a file", e);
}
Draken
  • 3,134
  • 13
  • 34
  • 54

0 Answers0