Java Mailing List Archive

http://www.gg3721.com/

Home » user.groovy »

[groovy-user] sourcepath option with groovyc

pexatus

2008-08-07

Replies: Find Java Web Hosting

Author LoginPost Reply

How can I alter the sourcepath when compiling with groovyc? I tried the
following:

Place two files, Hello.java and Util.java, in a directory named src, with
the following content:

Hello.java:
public class Hello {
  public static void main(String[] args) {
   System.out.println(Util.str());
  }
}

Util.java:
public class Util {
  public static String str() {
   return "hello";
  }
}

From the command line, navigate to the parent of src/ and execute the
following command:

javac -sourcepath src/ src/Hello.java

This command properly compiles the two source files. Now execute the
following command:

groovyc -Fsourcepath src/ src/Hello.java

I expected this to have the same effect, but it produces the following
error:

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
failed, src: src (Access is denied)

1 error

However, navigating into src and executing

groovyc Hello.java

works perfectly. I have read-write permissions to the src/ directory and
files contained therein, so I don't understand the "Access is denied" error.

Thank you,
Dave
--
Sent from the groovy - user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email


©2008 gg3721.com - Jax Systems, LLC, U.S.A.