The code is being compiled to create a library, but it contains declarations that are not allowed. Code that is used to create libraries can contain only classes, interfaces, and packages.
To correct this error
-
Make sure that the code contains only classes, interfaces, and packages.
See Also
Reference
/target:libraryclass Statement
interface Statement
package Statement