title: Get file in the resources folder in Java
body: <p>I want to read the file in my resource folder in my Java project. I used the following code for that</p>
  
  <pre><code>MyClass.class.getResource("/myFile.xsd").getPath();
  </code></pre>
  
  <p>And I wanted to check the path of the file. But it gives the following path</p>
  
  <pre><code>file:/home/malintha/.m2/repository/org/wso2/carbon/automation/org.wso2.carbon.automation.engine/4.2.0-SNAPSHOT/org.wso2.carbon.automation.engine-4.2.0-SNAPSHOT.jar!/myFile.xsd
  </code></pre>
  
  <p>I get the file path in the maven repository dependency and it is not getting the file. How can I do this?</p>