How can you reproduce this cryptic error on an Ubuntu terminal:
Put this in the Main.java file:
public Main{ public static void main(String[] args){ System.out.println("ok"); } }
Then compile it as follows:
user@defiant /home/user $ javac Main error: Class names, 'Main', are only accepted if annotation processing is explicitly requested 1 error
This is because you did not specify .java at the end of Main .
Do it like this and it works:
user@defiant /home/user $ javac Main.java user@defiant /home/user $
Now break your forehead and grumble that the error message is so cryptic.
Eric Leschinski Sep 18 '14 at 18:57 2014-09-18 18:57
source share