How do you configure GroovyConsole so I don't have to import libraries at startup?

fooMonster picture fooMonster · May 4, 2009 · Viewed 9.4k times · Source

I have a groovy script that uses a third party library. Each time I open the application and attempt to run my script I have to import the proper library.

I would like to be able to open GroovyConsole and run my application without having to import the library.

Answer

Squelsh picture Squelsh · Sep 8, 2011

In Linux you also have

/usr/share/groovy/conf/groovy-starter.conf

Here you can add your specific libs:

# load user specific libraries
load !{user.home}/.groovy/lib/*.jar
load /home/squelsh/src/neo4j-community-1.4.M03/lib/*.jar
load /home/squelsh/src/neo4j-community-1.4.M03/system/lib/*.jar

Hope it helps, had to search long time to find this (: