This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Groovy and the fly likes GroovyClassLoader - parse folder Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Languages » Groovy
Bookmark "GroovyClassLoader - parse folder" Watch "GroovyClassLoader - parse folder" New topic
Author

GroovyClassLoader - parse folder

Stefan Hofmann
Greenhorn

Joined: Jan 22, 2011
Posts: 2
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

Joined: Jan 22, 2011
Posts: 2
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...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: GroovyClassLoader - parse folder
 
Similar Threads
Groovy embedded in Java and maintenance
Groovy/Java Integration
Questions abt Groovy environment
Hibernate + Dynamic Groovy Class (Is this even possible)
Invalid method Code length