Search code examples
javajavac

Javac compile arguments


I'm doing this tutorial and I'm stuck at the last part.

$ javac -cp target/apt-demo-1.0-SNAPSHOT.jar Test.java
Note: Printing: Test
Note: Printing: a1(int)

Running it just says "javac: file not found Test.java" (I downloaded the source from github, so it's identical.)


Solution

  • You need to specify package also.

    $ javac -cp target/apt-demo-1.0-SNAPSHOT.jar your package.Test.java