I get a relative path in this way
String path = getClass().getResource("/META-INF/persistence.xml").toString();
and throws me this exception:
java.io.FileNotFoundException: C: \ Users \ Priojects \ Documents \ NetBeansProjects \ JavaApplication6 \ file: \ C: \ Users \ Priojects \ Documents \ NetBeansProjects \ JavaApplication6 \ build \ classes \ META-INF \ persistence.xml (The file name, directory name or syntax of the volume label are not correct)
the exception shows two routes, one from C: .... to file (I do not know where this file is from) and the other from file:
\ C: \ Users \ Priojects \ Documents \ NetBeansProjects \ JavaApplication6 \ build \ classes \ META-INF \ persistence.xml
(this is the correct one) I want only the correct one to appear. I appreciate your help very much