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

前端 未结 5 1980
长发绾君心
长发绾君心 2021-02-06 04:44

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 lik

5条回答
  •  忘掉有多难
    2021-02-06 05:35

    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 (:

提交回复
热议问题