2

I am trying to create package-info.java of a package which is already being created. Eclipse have the option to create a package-info.java at the time of create of package. Is there any way to create package-ingo.java after creating package?

  • 2
    Possible duplicate of [Is there a way to create package-info.java for existing packages in one move in eclipse?](https://stackoverflow.com/questions/38177068/is-there-a-way-to-create-package-info-java-for-existing-packages-in-one-move-in) – Kepotx Mar 21 '18 at 09:05

2 Answers2

4

Yes you can create a package-info.java after creation of the package also, Just Right click the on the existing package then click new -> package, In New Java Package input box, name should be the same as existing package name and tick the checkbox "create package-info.java" and click finish button, then package-info.java will be created in your existing package.

1

As stated in this question, no, there is no specific shortcut to create package-info.java, however copy-paste it from an other existing package works.

Kepotx
  • 1,095
  • 12
  • 26