• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GroovyClassLoader - parse folder

 
Stefan Hofmann
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I use a uncompiled groovy class which I load and compile at runtime in my standard java program with the following code:



This class needs to access other groovy classes, which reside in another folder. Is there the possibility to load a complete folder of groovy source code, maybe even recursively...

Thank you very much in advance!
Stefan
 
Stefan Hofmann
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I got it working by myself. What I've done is using the GroovyScriptEngine instead of directly using the GroovyClassLoader.
The GroovyScriptEngine has a constructor where I can tell all my folders where groovy scripts reside in...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic