Annotations: package-info.java
In Eclipse IDE I do the next thing:
@MyAnnotation
package annotations;
@interface MyAnnotation {
}And Eclipse tells me that Package annotations must be in file package-info.java. In Java Language Specification I didn't find something about file package-info.java. Where I can read something about it?
What is the syntax of the file package-info.java. Maybe you have an example?
http://java.sun.com/docs/books/jls/third_edition/html/packages.html Discussion of Section 7.4.1.1
Similar Messages
-
Problem with "package-info.java" using EJB 3.0 and OC4J
Hi all.
I already posted this question on JDeveloper forum, but didn't get any answer,
so I'll try posting here.
Anyway, I'm new both to JDeveloper and J2EE,
so I'm trying out examples for EJB 3.0, and I got stuck at "Use Security Annotations with EJB 3.0"
(http://www.oracle.com/technology/tech/java/oc4j/ejb3/howtos-ejb3/howtoejb30security/doc/how-to-ejb30-security-ejb.html).
Example code is working perfectly, if one builds it using Ant, but I'm importing all examples into JDeveloper (or at least I'm trying to :))
JDeveloper can't build file "package-info.java" containing following code:
@javax.annotation.security.SecurityRoles(roleNames={"superuser", "user"})
package oracle.ejb30;I'm getting following output in "Compiler - Log" window:
Error(2,1): 'class', 'interface', or 'enum' expected.
Help much appreciated...
platform used:
Windows XP SP2
JDeveloper Studio (Version 10.1.3, Build 3412)
JDK 1.5_06
OC4J 10.1.3 developer preview 4 (standalone version)Since you're using EJBs, you can use JTA and can skip the getTransaction() calls. If you want to use getTransaction().begin() and commit(), then make sure that your EntityManager is resource-local. The configuration for this is in persistence.xml. Set a transaction-type of RESOURCE_LOCAL rather than JTA.
-
Creating package-info.java in Netbeans
I'm a little frustrated that Netbeans won't even let you create a 'package-info.java' file because of its naming rules. Is there any way to get around this?
I don't know NetBeans very well, so don't know of any workaround for the naming.
You can just name the file "package.html" and it will do the same thing. The drawback is that it won't allow for package annotations -- it can still have javadoc tags, though.
http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html#packagecomment -
XML without namespace and prefix, modified package-info.java, JAX-WS option
Hello
I have created a consumer business service which will be called from JDEdwards EOne, pulls data from database and send it to Fusion Middleware.
SO, I have created proxy using JAX-WS option. And suggested in oracle doc, I created proxy outside OMW and then copied it to my project. XML payload is getting generated without namespace and prefix. After some research, I modified package-info.java. Now, I am able to send the payload and if test it locally from Jdeveloper and take xml output using marshaller I can see it has namespace and prefix as well. BUt, when I run this from server it does not have namespace and prefix.
Please help.
Thanks
TKJust to clerify,
The common complex types are StatusInfo, IdcProperty and IdcPropertyList. I ahve 3 more WSDL's with the exact same entires for those 3. -
Revision: 10059
Author: [email protected]
Date: 2009-09-08 11:31:48 -0700 (Tue, 08 Sep 2009)
Log Message:
update two package-info.java files, and add one new one.
Modified Paths:
blazeds/trunk/modules/proxy/src/flex/messaging/services/http/proxy/package-info.java
Added Paths:
blazeds/trunk/modules/core/src/flex/messaging/util/concurrent/package-info.java
blazeds/trunk/modules/core/src/flex/messaging/validators/package-info.javaRevision: 10059
Author: [email protected]
Date: 2009-09-08 11:31:48 -0700 (Tue, 08 Sep 2009)
Log Message:
update two package-info.java files, and add one new one.
Modified Paths:
blazeds/trunk/modules/proxy/src/flex/messaging/services/http/proxy/package-info.java
Added Paths:
blazeds/trunk/modules/core/src/flex/messaging/util/concurrent/package-info.java
blazeds/trunk/modules/core/src/flex/messaging/validators/package-info.java -
Checkstyle warning: Missing package-info.java file
Hi,
I'm getting a checkstyle warning for a simple class which looks like:
package tools.interprocess;
* Class for testing RMI.
* @author spinth
public final class RMITest {
* Private constructor.
private RMITest() {
* Main method.
* @param args User arguments
public static void main(final String[] args) {
}The warning message says: Missing package-info.java file
I really couldn't figure out what this means and how I can fix it. Do I have to add something to the source tree?
I'm using Eclipse for development and Eclipse-cs as my checkstyle plug-in.
Thanks.
Edited by: spinth on Apr 15, 2010 12:37 PMIf you don't want that warning then simply turn it of.
A package-info.java file is there mostly to attach JavaDoc to the package itself.
If you don't need/want that, then the checkstyle warning is useless. Checkstyle (and similar tools) are meant to be tweaked to your needs and not used blindly. -
hi folks,
Can any one tell me how to get Package info in the Java Doc??
ie how to include comment in source code so as to get the Package
info in the javadoc ??
ex
package hiall;
* @param args
public class Hello {
} will print only the class infoWhy we can not import a user defined package as an ordinary java package that is
java.swing.*;
we have to explicitly menction that class name inorder to import that specified class that is like
giri.addints;
Here giri is my own package and addints is class..........
it is not going to work if import as
import giri.*;
with regards... -
Hi Guys,
I'm new in java world, and I have some questions, if anybody can help me plz.
1- The packages in java such java.sql and so on where we can downlad it?
2- How to add these packages to work with java?
ThanksThe following packages are already bundled with the jdk or jre you downloaded and installed:
java.applet
java.awt
java.awt.color
java.awt.datatransfer
java.awt.dnd
java.awt.event
java.awt.font
java.awt.geom
java.awt.im
java.awt.im.spi
java.awt.image
java.awt.image.renderable
java.awt.print
java.beans
java.beans.beancontext
java.io
java.lang
java.lang.annotation
java.lang.instrument
java.lang.management
java.lang.ref
java.lang.reflect
java.math
java.net
java.nio
java.nio.channels
java.nio.channels.spi
java.nio.charset
java.nio.charset.spi
java.rmi
java.rmi.activation
java.rmi.dgc
java.rmi.registry
java.rmi.server
java.security
java.security.acl
java.security.cert
java.security.interfaces
java.security.spec
java.sql
java.text
java.text.spi
java.util
java.util.concurrent
java.util.concurrent.atomic
java.util.concurrent.locks
java.util.jar
java.util.logging
java.util.prefs
java.util.regex
java.util.spi
java.util.zip
javax.accessibility
javax.activation
javax.activity
javax.annotation
javax.annotation.processing
javax.crypto
javax.crypto.interfaces
javax.crypto.spec
javax.imageio
javax.imageio.event
javax.imageio.metadata
javax.imageio.plugins.bmp
javax.imageio.plugins.jpeg
javax.imageio.spi
javax.imageio.stream
javax.jws
javax.jws.soap
javax.lang.model
javax.lang.model.element
javax.lang.model.type
javax.lang.model.util
javax.management
javax.management.loading
javax.management.modelmbean
javax.management.monitor
javax.management.openmbean
javax.management.relation
javax.management.remote
javax.management.remote.rmi
javax.management.timer
javax.naming
javax.naming.directory
javax.naming.event
javax.naming.ldap
javax.naming.spi
javax.net
javax.net.ssl
javax.print
javax.print.attribute
javax.print.attribute.standard
javax.print.event
javax.rmi
javax.rmi.CORBA
javax.rmi.ssl
javax.script
javax.security.auth
javax.security.auth.callback
javax.security.auth.kerberos
javax.security.auth.login
javax.security.auth.spi
javax.security.auth.x500
javax.security.cert
javax.security.sasl
javax.sound.midi
javax.sound.midi.spi
javax.sound.sampled
javax.sound.sampled.spi
javax.sql
javax.sql.rowset
javax.sql.rowset.serial
javax.sql.rowset.spi
javax.swing
javax.swing.border
javax.swing.colorchooser
javax.swing.event
javax.swing.filechooser
javax.swing.plaf
javax.swing.plaf.basic
javax.swing.plaf.metal
javax.swing.plaf.multi
javax.swing.plaf.synth
javax.swing.table
javax.swing.text
javax.swing.text.html
javax.swing.text.html.parser
javax.swing.text.rtf
javax.swing.tree
javax.swing.undo
javax.tools
javax.transaction
javax.transaction.xa
javax.xml
javax.xml.bind
javax.xml.bind.annotation
javax.xml.bind.annotation.adapters
javax.xml.bind.attachment
javax.xml.bind.helpers
javax.xml.bind.util
javax.xml.crypto
javax.xml.crypto.dom
javax.xml.crypto.dsig
javax.xml.crypto.dsig.dom
javax.xml.crypto.dsig.keyinfo
javax.xml.crypto.dsig.spec
javax.xml.datatype
javax.xml.namespace
javax.xml.parsers
javax.xml.soap
javax.xml.stream
javax.xml.stream.events
javax.xml.stream.util
javax.xml.transform
javax.xml.transform.dom
javax.xml.transform.sax
javax.xml.transform.stax
javax.xml.transform.stream
javax.xml.validation
javax.xml.ws
javax.xml.ws.handler
javax.xml.ws.handler.soap
javax.xml.ws.http
javax.xml.ws.soap
javax.xml.ws.spi
javax.xml.xpath
org.ietf.jgss
org.omg.CORBA
org.omg.CORBA_2_3
org.omg.CORBA_2_3.portable
org.omg.CORBA.DynAnyPackage
org.omg.CORBA.ORBPackage
org.omg.CORBA.portable
org.omg.CORBA.TypeCodePackage
org.omg.CosNaming
org.omg.CosNaming.NamingContextExtPackage
org.omg.CosNaming.NamingContextPackage
org.omg.Dynamic
org.omg.DynamicAny
org.omg.DynamicAny.DynAnyFactoryPackage
org.omg.DynamicAny.DynAnyPackage
org.omg.IOP
org.omg.IOP.CodecFactoryPackage
org.omg.IOP.CodecPackage
org.omg.Messaging
org.omg.PortableInterceptor
org.omg.PortableInterceptor.ORBInitInfoPackage
org.omg.PortableServer
org.omg.PortableServer.CurrentPackage
org.omg.PortableServer.POAManagerPackage
org.omg.PortableServer.POAPackage
org.omg.PortableServer.portable
org.omg.PortableServer.ServantLocatorPackage
org.omg.SendingContext
org.omg.stub.java.rmi
org.w3c.dom
org.w3c.dom.bootstrap
org.w3c.dom.events
org.w3c.dom.ls
org.xml.sax
org.xml.sax.ext
org.xml.sax.helpers
kind regards,
Jos -
How browse through the sun.* package in java
in java we have some packages starting with sun.java..... how to read these packages info.
Well unless you find urself a java class decompiler you cant see the source code but if you open the rt.jar file (found in the lib folder of your jre installation) in winzip or winrar you can see all the classes and their packages.
-
Hi All,
I want know jar name of this ( com.bea.control.annotations ) package.
Thanks,
Vass Leethanks.
java -version java version "1.4.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1)
Classic VM (build 1.4.1, J2RE 1.4.1 IBM AIX build ca1411ifx-20040810 (141SR3) (JIT enabled: jitc)
i cant find rt.jar under our 1.4 folder /usr/java14. but there's a rt.jar under our /usr./java131/jre/lib/rt.jar.
I'm not sure how to tell what command server was sending. it errors at "open" command on multiple ftp servers. the whloe message produced is like this:
Glub Tech Secure FTP v2.5.9
Copyright (c) 1999-2006 Glub Tech, Inc.
java.lang.NullPointerException
at com.glub.secureftp.bean.d.run(Unknown Source)
Licensed for non-commercial use.
ftp> open ftpserver1
Exception in thread "main" java.lang.NoClassDefFoundError: sun/security/x509/CertAndKeyGen
at com.glub.secureftp.bean.SSLFTP.a(Unknown Source)
at com.glub.secureftp.bean.SSLFTP.<init>(Unknown Source)
at com.glub.secureftp.bean.SSLFTP.<init>(Unknown Source)
at com.glub.secureftp.client.cli.t.case(Unknown Source)
at com.glub.secureftp.client.framework.CommandPlayer.a(Unknown Source)
at com.glub.secureftp.client.framework.g.a(Unknown Source)
at com.glub.secureftp.client.framework.g.if(Unknown Source)
at com.glub.secureftp.client.cli.ak.a(Unknown Source)
at com.glub.secureftp.client.cli.ak.if(Unknown Source)
at com.glub.secureftp.client.cli.SecureFTP.<init>(Unknown Source)
at com.glub.secureftp.client.cli.SecureFTP.main(Unknown Source)
thanks
dj -
Revision: 1548
Author: [email protected]
Date: 2008-05-03 03:48:18 -0700 (Sat, 03 May 2008)
Log Message:
Added @exclude to Javadoc package-info file for this package.
Modified Paths:
blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/cluster/package-info.javanbd wrote:
How could one interpret this?
[root@kw etc]# checkupdates | grep pcre
pcre
[root@kw etc]# pacman -Si pcre | grep Version
Version : 8.37-1
[root@kw etc]# pacman -Qi pcre | grep Version
Version : 8.37-1
[root@kw etc]#
Ok, after updating your original post and asking this question I understand what you are actually trying to do. The "local package database" generally refers to /var/lib/pacman/local, not /var/lib/pacman/sync, which is why it was unclear.
fakeroot pacman -Syb /tmp/tmpdb -i pcre
should do what you want, but be very careful never to install anything using that temporary database. Take a look at the checkupgrades script to see how it does things if you want to do more than just check remote package info. -
[svn] 1549: New Javadoc package-info file.
Revision: 1549
Author: [email protected]
Date: 2008-05-03 03:53:04 -0700 (Sat, 03 May 2008)
Log Message:
New Javadoc package-info file.
Added Paths:
blazeds/branches/3.0.x/modules/proxy/src/java/flex/messaging/services/http/package-info.j avaRevision: 1549
Author: [email protected]
Date: 2008-05-03 03:53:04 -0700 (Sat, 03 May 2008)
Log Message:
New Javadoc package-info file.
Added Paths:
blazeds/branches/3.0.x/modules/proxy/src/java/flex/messaging/services/http/package-info.j ava -
How to query package info from the server repo instead of local DB?
Greetings!
Is there an option in pacman to query the package info ( like -Si ) from the server repo instead of the local package database? Or maybe some additional program is needed for this?
Update: Maybe this can be done by downloading a fresh copy of package DB with -Sy, but how to specify a custom package DB file? Is this accomplished with --dbpath option? Say
pacman -Sy --dbpath /tmp/tmpdb
Last edited by nbd (2015-06-07 18:44:23)nbd wrote:
How could one interpret this?
[root@kw etc]# checkupdates | grep pcre
pcre
[root@kw etc]# pacman -Si pcre | grep Version
Version : 8.37-1
[root@kw etc]# pacman -Qi pcre | grep Version
Version : 8.37-1
[root@kw etc]#
Ok, after updating your original post and asking this question I understand what you are actually trying to do. The "local package database" generally refers to /var/lib/pacman/local, not /var/lib/pacman/sync, which is why it was unclear.
fakeroot pacman -Syb /tmp/tmpdb -i pcre
should do what you want, but be very careful never to install anything using that temporary database. Take a look at the checkupgrades script to see how it does things if you want to do more than just check remote package info. -
How can I get the working directory of a project from an Annotation Processor in Java
I am writing an annotation processor in Java and in this annotation processor I want to be able to find a file in the Project hierarchy of the project on which I am using this annotation processor. Through the annotation I can pass in the path of the file I am searching for relative to the project root but i cannot retrieve the project's working directory.
Let's say that the processor is MyCustomProcessor and I am using it on the project MyProject. I want to be able to access(read) a file (a properties file) from the project structure of MyProject from the "process" method of MyCustomProcessor.
I have read this link Eclipse - Annotation processor, get project path but when I use their solution I get a null returned from the StandardJavaFileManager.getLocation(StandardLocation.SOURCE_PATH) call.
Some more details regarding the implementation:
MyAnnotationProcessor:
@SupportedAnnotationTypes(value = {"MyAnnotation" })
@SupportedSourceVersion(RELEASE_6)
public class MyCustomProcessor extends AbstractProcessor {
@Override public boolean process(final Set<? extends TypeElement> annotations, final RoundEnvironment roundEnv) {
for (final Element element : roundEnv.getElementsAnnotatedWith(MyAnnotation.class)) {
<!-- Here is where I would like to get the working directory !-->
More details about the testing and development environment: Eclipse Kepler, JRE 1.7.
If you need more details just ask.There is an identical post with an answer located at this link.
-
How to import DBMS_LOB package in java
hi
how we can use pl/sql's package in java
any body can help me
where i can found harachy of DBMS_LOB package
to include in my java or jsp program
thanxperhaps this topic can help :
Calling PL/SQL from Java
and the use of DBMS_LOB package is here:
Supplied PL/SQL Packages and Types Reference Contents / Search / Index / PDF
http://download-east.oracle.com/docs/cd/B10501_01/appdev.920/a96612.pdf
Java Stored Procedures Developer's Guide Contents / Search / Index / PDF
http://otn.oracle.com/pls/db92/db92.docindex?remark=homepage
I hope that can help you. Perhaps another person can give the excat code.
Good luck!
Joel P�rez
Maybe you are looking for
-
Delivery QTY is more than Stock qty in Stock transfer order
Dear Sir i created one STO with Qty 100,i got the stock of 10 in my hand when i create delivery with ref to STO through VL10B, delivery created for whole STO qty is there is any specific setting to control this my requirement is like delivery qty sho
-
HP Officejet Pro 8500 A909g - doesn't install on Windows 8
I upgraded my HP computer to Windows 8 Pro from Windows 7.The HP Officejet Pro 8500 A909g was running fine with Windows 7, but will not install correctly on Windows 8 Pro. I've tried reinstalling numerous times. Sometimes the installation appears to
-
Data back-up saved on Satellite L300
Hi All, Yesterday my laptop accidentally slipped from my hand and now its screen is looking like damaged. I am worried about my data which I have saved on 'D drive'. Is data on d drive means it is on hard drive ? How can i recover it ? Any reply will
-
Monitor died for G3 Power Mac tower. What do I do?
The monitor to my G3 PowerMac just died. The power button started flashing orange and green and it won't power up. Is there anything I can do to fix it? If not..are there any other modern monitors that are compatible or is there a chord that can make
-
I have bought an I pad Air 128 with cellular connection.I travel a lot and will need to insert various cellular providers sim cards in the countries i visit. Will these various sim cards work in the I pad Air or is the i pad locked?