Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Juno - What is the use of package-info.java?

Tags:

java

eclipse

When a new package is being created in Eclipse Juno, a java file (package-info.java) would be created automatically. What is the use of that file? Is it useful in importing specific classes in another class?

like image 695
IMJS Avatar asked Sep 26 '12 09:09

IMJS


People also ask

What is Package-info Java in Eclipse?

Simply put, package-info is a Java file that can be added to any Java package.

What is Package-info Java used for?

The package-info. java is a Java file that can be added to any Java source package. Its purpose is to provide a home for package level documentation and package level annotations.

What is Package-info Java in JAXB?

package-info. java is a way to apply java annotations at the package level. In this case Jaxb is using package-level annotations to indicate the namespace, and to specify namespace qualification for attributes (source).


1 Answers

package-info.java is a package comment file, used by Javadoc for giving your package its own documentation.

It was introduced in Javadoc 5.0, and replaces package.html.

like image 166
David Grant Avatar answered Oct 09 '22 04:10

David Grant