I have created a simple Maven project with no archetype, everything is okay. Then I added a CVA.pmml
file under the main/resources
directory. Afterwards, I want to read the file but get FileNotFoundException
. I tried the following methods:
Method 1:
InputStream is = BundleTest.class.getResourceAsStream("CVA.pmml");
Method 2:
InputStream is = BundleTest.class.getResourceAsStream("resources/CVA.pmml");
Method 3:
InputStream is = new FileInputStream("CVA.pmml");
Method 4:
InputStream is = new FileInputStream("resources/CVA.pmml");
None of them works. Any suggestion?
Here is the screenshot of the project structure: