我想在我的Java项目中读取资源文件夹中的文件。我使用了以下代码:
MyClass.class.getResource("/myFile.xsd").getPath();
我想检查文件的路径。但它给出了以下路径。
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
我在Maven仓库依赖中获得了文件路径,但是找不到该文件。我该怎么做?