Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to write package-info.java in eclipse

Tags:

I want to write package level annotations. Can some tell how to write package-info.java in eclipse.

I want to add this info to it.

@javax.xml.bind.annotation.XmlSchema (       elementFormDefault=XmlNsForm.UNQUALIFIED       ...     ) 

Thanks.

like image 528
Patan Avatar asked Jan 24 '13 12:01

Patan


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 a package-Info Java file?

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. Simply create the package-info.

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

You have to create the file in the package using New -> File.

New -> Class will not allow you to create the file because the file name is not accepted.

like image 92
FrVaBe Avatar answered Sep 21 '22 18:09

FrVaBe