Edit: Turns out I hadn't rebuilt the program in a while. If all the other answers for this kind of problem are not working for you, try rebuilding! Thanks Timo!
I've looked at a ton of answers and tried a bunch of stuff. I know I must be doing something extremely minor wrong. If anyone has a quick tip please let me know, this is slowly killing me.
I'm trying to read in testDom.xml with
File testFile = new File(getClass().getResource("testDom.xml").getFile());
I've tried loading from the class:
File testFile = new File(GemsDomGetChildrenTest.class.getResource("testDom.xml").getFile());
I've tried both with the path as
/lambda-compiler/src/test/resources/testDom.xml
/src/test/resources/testDom.xml
/test/resources/testDom.xml
/resources/testDom.xml
/testDom.xml
testDom.xml
And I've tried all those paths without leading '/' as well.
The resources folder also seems to be added as a test resource in IntelliJ too:
I get that this is probably a duplicative question and has been asked a million times, but I'm really struggling to see what I'm doing differently than all the other questions I've viewed so far. Any help would be greatly appreciated.
Alright so Timo was able to figure it out. I hadn't rebuilt the project for a while (:facepalm:). Coming from the python world here, where things are a little different. Thanks for working through this with me everyone, it really means a lot!
Este artículo se recopila de Internet, indique la fuente cuando se vuelva a imprimir.
En caso de infracción, por favor [email protected] Eliminar
Déjame decir algunas palabras