Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using freemarker in standalone java program?

 
Aman S Singh
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to use integrate freemarker in standalone java program, if yes please let me know the link.
 
Aman S Singh
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got the basic example working, if anybody have another suggestions please let me know-


 
Campbell Ritchie
Sheriff
Pie
Posts: 49466
64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's freemarker? How are you adding it to your classpath?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Other suggestions for what? If it works, are there any other further issues?

Moving to other open source libraries.
 
Aman S Singh
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:What's freemarker? How are you adding it to your classpath?


Freemarker is a open source java templating engine. You could think of freemarker vs jsp vs velocity. But it has uses beyond that, it could help you define file format. As in my case, instead of writing the code in java to write flat file, why not use freemarker template, the same template is portable.

The template used for above program is like this-



Result after running the program-

Check out from data model Hello World!
 
Aman S Singh
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to add freemarker.jar to your classpath.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic