Java - File Location

  

I am creating a new integration studio extension and want to include a template PDF file which I can reference using: File f = new File("/J2EE/Template.pdf");


My problem is that I am getting an error: "java.io.FileNotFoundException: /J2EE/Template.pdf (No such file or directory)"


I have tried every combination of the file path I can think of but can't get it to work. I have the file included in the Resources section of Integration Studio.


Does anyone know what path i need to use?


Thanks

StuartB wrote:

I am creating a new integration studio extension and want to include a template PDF file which I can reference using: File f = new File("/J2EE/Template.pdf");


My problem is that I am getting an error: "java.io.FileNotFoundException: /J2EE/Template.pdf (No such file or directory)"


I have tried every combination of the file path I can think of but can't get it to work. I have the file included in the Resources section of Integration Studio.


Does anyone know what path i need to use?


Thanks

Hi Stuart,


I don't have access to an Java installation but here's my 2 cents to try to help you.


Try to consider the file in the classpath - maybe there is a simpler solution but the following seams to work in a quick test I did.


Check the attachment.


Cheers,

Renato