In eclipse
Since package-info.java isn’t a valid identifier for a class it cannot be created as a class in Eclipse.
I found that when you create a new package there is a check box to check if you want a package-info.java.
To create a package-info.java file in an existing package:
- Right-click on the package where you want a package-info.java.
- Select New->Package.
- Check the Create package-info.java check box.
- Click on Finish.