I have to copy classpath resource from one package to another.
My program is:
public static void main(String[] args) throws IOException, URISynta
problem is that Paths.get() doesnt expect that kind of value which is generated from uri.getPath().
Paths.get()
uri.getPath()
Solution:
URI uri = ClassLoader.getSystemResource("com/stackoverflow/json").toURI(); String mainPath = Paths.get(uri).toString(); Path path = Paths.get(mainPath ,"Movie.class");