I have a file X.json inside abc.jar in its classpath. There is a method readFile in abc.jar which reads the file as
URL url = Abc.class.getClassLoader().getResou
By the time of deployment, those resources will become an embedded-resource. That being the case, the resource must be accessed by URL instead of File. See the info page for the tag, for a way to form an URL.
URL
File