How do i get file path of my file in java enterprise application?
<p>I created java enterprise application and it consists of ejb module and web application. I have plain old xml file in source packages folder in package "common" in my ejb module. I want to pass this file path in File() constructor for one class in ejb module. How do i do it?</p>

<p>If i pass any of the below it doesn't work :-</p>

<pre><code>new File("abc.xml"); //this take file from glassfish/domains/domain1 :(

new File("./abc.xml");
</code></pre>

<p>I don't want to pass hardcode path like /home/administrator/appname/module/etc..</p>

<p>I want the path relative from my ejb module. Please help me. I've tried all things.</p>

<p>Actually when i created a class in same folder and then try <code>classname.getResource("abc.xml").getPath()</code> it works fine. But what if i don't have any class in that folder. Waiting for your replies</p>
