本文介绍了如何在启动时将导入添加到groovysh?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个项目,希望用户在Groovysh上尝试Java类。我想为它们提供便利,并且在groovysh启动时默认情况下要导入某些软件包,以便用户在每次启动shell时不必重新输入相同的导入内容。有谁知道如何做到这一点?



在此先感谢,
igor

解决方案

您可以将导入添加到 $ HOME / .groovy / groovysh.rc


I'm working on a project where I'd like users to experiment with Java classes on Groovysh. I'd like to make it convenient for them and want to import certain packages by default, when groovysh starts up so that users would not have to re-type the same imports every time they start the shell. Does anyone know how to accomplish this?

Thanks in advance,igor

解决方案

You can add the imports to $HOME/.groovy/groovysh.rc

这篇关于如何在启动时将导入添加到groovysh?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-24 21:07