[antlr-interest] StringTemplate issue
birmanstefan
birmanstefan at yahoo.com
Mon Jun 21 03:03:54 PDT 2004
Hello Ter,
I used a jarred app, which includes a library of templates, and
run in a "Can't load template" error. It seems that it tries to load
template from an illegal path. I put a testcase in group's files
directory called test4tp.jar (includes all you need to reproduce the
issue).
The fix was to create a group without a root directory and include
all the templates in the root of the jar. The bad thing is that it
doesn't preserve the hierarchy in jar file and have to modify in
original code (=> two versions : for jarred and un-jarred app).
I took a look in the StringTemplateGroup.loadTemplate() and I saw
that it uses some classLoader stuff to load the template. Enlarging
this mechanism in order to be able to load templates from dir
structure in a jar file (JAR URL) should fix the issue. I'm not very
familiar with this mechanism, so I must ask : am I looking in the
wrong direction?
On the other hand, are there any news on StringTemplates 2.0?
Thanks,
Stefan.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list