java - Don't find my file.properties -


i try lot of thinks find fail don't know how can it. code is:

    //dominiollamadaredsys.java      properties d = new properties();     inputstream entrada = null;     try {           entrada = new fileinputstream("prop/datosapp.properties");         d.load(entrada);          system.out.println(d.getproperty("txd.endpointurl"));       } catch (ioexception ex) {          system.out.println("error: "+ ex.getmessage());      } {         if (entrada != null) {         try {             entrada.close();         } catch (ioexception e) {         }         }     } 

i call file inside class in "com.rsi.secpay.dominio" , catch same exception (don't find file), had try quit "prop/" (just "datosapp.properties" ) properties files this:

enter image description here

if prop package in classpath, can stream using classloader:

inputstream = dominiollamadaredsys.class.getresourceasstream("/prop/datosapp.properties"); 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -