can any body please tell me how to create package-info.java file in netbeans,when i am trying to create a new java file with name package-info to specify a package level annotation,class name is not valid error is thrown
Thanks in advance
can any body please tell me how to create package-info.java file in netbeans,when i am trying to create a new java file with name package-info to specify a package level annotation,class name is not valid error is thrown
Thanks in advance
The package-info.java is not exactly a java source file.
The proper way is, when you create a new file, do not create a Java Class file. Instead, create a Java Package Info file, also in the Java category. This will trigger the New Java Package Info wizard.
That's not completely correct. You can create a file under Other > Other > Empty File with name package-info.java
You can place there the Javadoc comments for the package and the "package" line:
/**
* Here are some comments about this package.
* Here is a comment linking to {@link java.lang.Object}.
*/
package packagename;