java - File are not found when using Intellij IDEA -


i have file named test-mule-flow.xml under src/main/app folder, , added unit test:

muleflowtest extends functionaltestcase @override public string getconfigresources() {     return "src/main/app/test-mule-flow.xml"; }  @test public void test...... 

actually tests executed correctly when execute in eclipse(mule studio) , in maven build, unfortunately these tests failed in intellij idea version 12.

and suppose caused classloader, in idea, sources files house in target/classes folder, , test class house in target/test-classes, maybe reason, how can configure it? , it better in maven way, don't want move configuration in idea manually.

thanks.

you have relative path specified , did not provide information how file under path read.

in case read classpath, should make sure there. maven there convention place resources under src\main\resources or src\test\resources. maven-aware ides add these locations classpath automatically. if reason cannot put file resources or other location included in classpath, can manually configure source directories project in idea.

in case file read filesystem, should check have working directory in corresponding run/debug configuration in idea.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -