java - Intellij module cannot access resources when included as a dependency in another module -
i have intellij project 2 modules. first module has myclass.java loads resources in it's constructor using getclass().getresourceasstream("/name.jpg");
the directory structure of project is
myproject modulea src main java (sources) mystuffa myclass.java mymaina.java resources (resources) name.jpg moduleb src main java (sources) mystuffb mymainb.java inside mymaina, can instantiate myclass without issue. when try instantiate new myclass in mymainb.java, myclass gets null pointer when loading name.jpeg resource.
what can fix this?
i ended packaging of modulea jar file, referencing jar file moduleb. works, don't it.
Comments
Post a Comment