o meu arquivo properties ta no mesmo diretorio das classes, to chamando o properties de uma classes normal (nao servlet) java dentro do Tomcat e da o seguinte erro
codigo
try{
props = new Properties();
InputStream in = new FileInputStream("sql.properties");
props.load(in);
if(in == null)
System.out.println("inin");
else
System.out.println("nao");
//in.close();
System.out.println(props.getProperty("connection.driver"));
if(props == null)
System.out.println("hehehehe");
}
catch(IOException ioe){
System.out.println("erro io");
ioe.printStackTrace();
}
erro
erro io
java.io.FileNotFoundException: \invent_estoque\sql.properties (O sistema nÒo pod
e encontrar o caminho especificado)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at app.CadastrarEmpresaBanco.getProperties(CadastrarEmpresaBanco.java:30
)
at app.CadastrarEmpresaBanco.<init>(CadastrarEmpresaBanco.java:22)
at app.CadastrarLookupDispacthAction.cadastrar(CadastrarLookupDispacthAc
tion.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchActio
n.java:276)
at org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatch
Action.java:162)
Alguem sabe como posso localizar o arquivo properties???