I'm trying to use annotations at package level but I get compilation erros from Eclipse.
I have a class Head
with the following package/annotation:
@javax.xml.bind.annotation.XmlSchema (
xmlns = {
@javax.xml.bind.annotation.XmlNs(prefix = "com",
namespaceURI="http://es.indra.transporte.common"),
@javax.xml.bind.annotation.XmlNs( namespaceURI="http://www.w3.org/2001/XMLSchema")
},
namespace = "http://es.indra.transporte.common",
elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED,
attributeFormDefault = javax.xml.bind.annotation.XmlNsForm.UNQUALIFIED
)
package es.indra.transporte.central.thalesinterface.common.beans;
I have created a package-info.java
in es.indra.transporte.central.thalesinterface.common.beans
folder with the above code but I'm still getting the compilation error
Package annotations must be in file
package-info.java
in Head
class. I'm using jdk6.