Re: Running a Groovy script with a compiled Java class

Balachandran Sivakumar <[email protected]>
Newsgroups gmane.comp.lang.groovy.user
Message-ID <CAMbkTg+j2qFXRoRkKN-Y5GbrYqioqxnjfF4E2OFXw1CNJxNraA@mail.gmail.com>
Hi Blake,


> -------------------------------
>
> #!/bin/bash
>
> # This script allows the running of a Groovy file in the context of the
> # entire system.
>
> JAR_PATH=`dirname $0`/../lib
> CLASSES_PATH=`dirname $0`/../build/web/WEB-INF/classes
>

    Just a quick word of caution not directly related to the approach
- You might want to add double quotes around $0 to handle paths that
have spaces in them. Also, it is preferable to use $(dirname "$0")
instead of backticks. Backticks can cause certain unexpected problems
when either being nested or when handling values that have quotes.
Thanks


-- 
Thank you
Balachandran Sivakumar
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.