How do I auto load a database jar in Groovy without using the -cp switch?

后端 未结 5 1072
既然无缘
既然无缘 2020-12-03 00:12

I want to simplify my execution of a Groovy script that makes calls to an Oracle database. How do I add the ojdbc jar to the default classpath so that I can run:

<         


        
5条回答
  •  情歌与酒
    2020-12-03 00:37

    groovy is just a wrapper script for the Groovy JAR that sets up the Java classpath. You could modify that script to add the path to your own JAR, as well, I suppose.

提交回复
热议问题