Hi Jerome,
Add your resources in the same folder structure as the Java class that will consume it and
use getClass().getResource() to retrieve a URL instance out of it:
{quote:class=jive_text_macro jive_macro_quote}
URL url = getClass().getResource("voila.txt");
Resource<?> resource = resourceFactory.create(url);
{quote}
Tip: Using FileResource directly in your addon is a bad practice, as it relies on the
physical file. The best would be to use Resource<?>. This makes your code unaware of
the resource location.
Best Regards,
George Gastaldi
Posted by forums
Original post:
https://developer.jboss.org/message/918944#918944