Finding paths for packed non-java files at runtime

So this may be a stupid question, but ...

I want to pack a specific WSDL file with an EJB project in eclipse. What would be the best way to reference this file in my code?

I would like to use a relative path, but the current directory runs in the / bin directory of my JBOSS installation. There seems to be a way to refer to the file in relation to the project file structure.

Any ideas?

+3
source share
1 answer

getClass().getResource(String path) . java.net.URL. getResourceAsStream(..) InputStream .

+1

Source: https://habr.com/ru/post/1729589/


All Articles