I am trying to load a template with velocity. The only thing I have is the path of a file. but I can’t seem to load the File with this absolute path. How do you need to do this?
The documentation is very fuzzy about reading absolute templates….
I am trying to use this in a plug-in for an RCP program
I think your best option is to look at the Resource Loader concept in Velocity. This is the way that Velocity provides for loading templates from arbitrary sources. See the documentation here for details.
You can look at the available ones for reference how they do it. There is a FileResourceLoader which probably does exactly what you need if configured properly.
If that does not work, you can derive from the base ResourceLoader class. Your ResourceLoader would then simply map from the name that you pass to the getTemplate()-call to the actual file.