what's wrong with this path that the double route brings me?

0

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

    
asked by Sebastian Albornoz 02.11.2017 в 19:26
source

0 answers