DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Set Classpath for Groovy on Linux


The "-cp" option of groovy is the same with Java.

Wildcards can be used on JDK6 or later. For example:

groovy -cp "/home/chad/apps/http-builder-0.6/:/home/chad/apps/http-builder-0.6/dependencies/" httpex.groovy

Note1: "**" is not supported, which means above command can not written as:

groovy -cp "/home/chad/apps/http-builder-0.6/**" httpex.groovy

Note2: ".jar" is not supported, which means "/home/chad/apps/http-builder-0.6/.jar" is invalid;

Note3: the double quotes of classpath is necessary;

Note4: "/home/chad" in classpath can not be replaced by "~";

See: http://stackoverflow.com/questions/219585/setting-multiple-jars-in-java-classpath



Published

Jul 9, 2013

Last Updated

Jul 9, 2013

Category

Tech

Tags

  • classpath 7
  • groovy 13
  • Java 106

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor