0

I have the java class in which i have provided the input xml and input xsl file locations as below as I have kept the input xml amd xsl in my project directory itself as shown below..

   //String xmlInput="C:\\InputXml\\SW.xml";            
    String xmlInput="/trunk/config/testxml/SW.XML";

    //String xslInput= "C:\\InputXml\\S.xsl"; 
    String xslInput= "/trunk/config/xmltransform/SD.xsl";

FileInputStream xml = new FileInputStream(xmlInput);
 FileInputStream xsl = new FileInputStream(xslInput);

as you can see please ignore the commented code as earlier i was reading the files from my C: of computer but now I have kept these files in my project itself now i am getting file not found exception please advise how to overcome from this

  • Please show the code where you use xmlInput – NamshubWriter Feb 14 '15 at 14:15
  • This will not work, unless project directory is at the root of the filesystem. Your first / is forcing trunk to be at right below root. If trunk is somewhere in your home directory or some project directory, that is more than one level from root, you need to provide the absolute path starting from root(/), or if your java file is below (some level) your project directory, you should use relative path(one that does not start with /). You can use .. to go one directory above where your java file is. – Pramod Feb 14 '15 at 14:21
  • **this is one of dozens and dozens of duplicates!** –  Feb 14 '15 at 14:22

0 Answers0