I
i_lk
hi
i m using JBuilderX... the problem i m facing is very basic yet i
could'nt find the sol...i m retrieving the contents of an xml file
using
InputStream is = another_class.getResourceInputStream("xyz.XML");
In another_class:-
protected static InputStream getResourceInputStream(String xml_file)
throws IOException {
System.out.println(xml_file) ;
ClassLoader cl = ResourceManager.class.getClassLoader();
return cl.getResourceAsStream(xml_file);
}
the code is fine but it cant get the xyz.xml file..and it returns
NULL.
i have used every option... i want to keep the file in a separate
directory in project files say dir1 .... what should i give in the
path(as an argument)... how can i get the path of that file as a part
of my
program...?
Thanks a lot
i m using JBuilderX... the problem i m facing is very basic yet i
could'nt find the sol...i m retrieving the contents of an xml file
using
InputStream is = another_class.getResourceInputStream("xyz.XML");
In another_class:-
protected static InputStream getResourceInputStream(String xml_file)
throws IOException {
System.out.println(xml_file) ;
ClassLoader cl = ResourceManager.class.getClassLoader();
return cl.getResourceAsStream(xml_file);
}
the code is fine but it cant get the xyz.xml file..and it returns
NULL.
i have used every option... i want to keep the file in a separate
directory in project files say dir1 .... what should i give in the
path(as an argument)... how can i get the path of that file as a part
of my
program...?
Thanks a lot