How do you configure groovy console so I don’t have to import it at startup?

I have a groovy script that uses a third-party library Every time I open an application and try to run my script, I have to import the appropriate library

I want to be able to open groovy console and run my application without importing

Solution

You also have in Linux

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

Here you can add your specific library:

# 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

I hope it helps. I have to search this for a long time (:

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>