Fabio's blog

“I like nonsense, it wakes up the brain cells. Fantasy is a necessary ingredient in living, it’s a way of looking at life through the wrong end of a telescope. Which is what I do, and that enables you to laugh at life’s realities.” - Dr. Seuss

Usando getResourceAsStream

As vezes precisamos carregar um recurso em nossa aplicação . Existem 2 formas de fezer esta procura:

getClass().getResourceAsStream()
procura o resource no mesmo diretorio do .class.
getClass().getClassLoader().getResourceAsStream())
procura no CLASSPATH.

links:
Smartly load your properties
eclipsezone

Activity

No comments, leave your comment or trackback.

Leave a Reply


Search

The archives run deep. Feel free to search older content using topic keywords.