Inheritance: public, private, protected & default?

I have a good idea where, and when, to use public, private and protected, but what is the default used for? By default I mean just not specifing the inheritance.
Ex:
String aString;
Thanks in advance,
Brian

It means basically that only classes written to the same package as that one, would be able to access the member, regardless of whether they inherit from the class or not. If a class inherits from it, but is not written in the same package, it cannot access the member - it's just as if it were written as "private" in that case.

Similar Messages

  • Static, public, private, protected?

    Sorry for these questions, but I still don't know why properly why you use static, prublic, protected?
    And also is it possible to have a multi array first bit being and short and second being a byte e.g.
    int item_id[] byte[]so item_id[0][0] = 5
    first 0 means you got nothing on
    second 0 is the hp stat
    = 5 adds 5 hp onto the total is this possible

    Morpher wrote:
    Sorry for these questions, but I still don't know why properly why you use static, prublic, protected?No problem, that's how you learn.
    Look at this and this .
    And also is it possible to have a multi array first bit being and short and second being a byte e.g.Why would you want to do that? If you feel like using wrapper classes, you can make an array of Objects.

  • Inheritance and access control - "private protected"

    I'm reopening an old topic, seems to have been last discussed here 2-3 years ago.
    It concerns the concept of restricting access to class members to itself, and its subclasses. This is what "protected" does in C++ and "private protected" did in early versions of the Java language. This feature was removed from Java with a motivation along the lines of not being "simple", and "linear" (in line with the other access modes, each being a true subset of the next). Unfortunately, the article which explained Sun's position on this keyword combination seems to have been removed from the site, so I haven't been able to read its original text.
    But regardless of simplicity of implementation or explaining Java's access modifiers to newbies, I believe it is a fundamental part of OO programming for such an access mode to exist. The arguments for having the standard "private" mode in fact also apply for having a C++-style "protected" mode. (Arguing that classes within a package are related and it therefore doesn't hurt to also give them access to Java's "protected" members, is equally arguing that "private" is unneccessary, which noone of course believes.)
    The whole concept of inheritance and polymorphism and encapsulation builds on the access modes private, protected, and public (in the C++ senses). In Java the "package" concept was added - a nice feature! But I see no justification for it to negate the proper encapsulation of a class and its specializations.

    What effect upon inheritance other than hiding members
    from subclasses is there?
    None. And I cant think of another declaration that prevents members from being inherited but private.
    Of course the onus comes on the programmer with Java's
    definition of "protected" - but
    1) there is rarely a single programmer working within
    a package
    The point was the package is a unit which does not hide from itself. Just like all methods within a class can see each other, all classes within a package can, and all packages within a program can.
    2) it muddies the encapsulation in the design - when
    you see a "protected" method someone else, or yourself
    some time ago - wrote, how do you know if the design
    intention is to have it accessed solely by the class
    and its subclasses, or if it is indeed intended to be
    shared with the whole package? The only way to do
    this today is to always explicitly specify this in the
    comments, which may be lacking, inconsistent, and
    abused (since it isn't enforced).Encapsulation would be implementation hiding. Not method hiding. The only thing you should probably allow out of your package is an interface and a factory anyway.
    I understand where you are coming from, but I really have not had occasion to take issue with it. I can't think of a real codeing situation where this is required. OTOH, I can't think of a coding situation where I need to access a protected method from another class either.

  • What is the difference between Public and Protected Attributes

    hi ppl,
             what is the difference if i declare attributes under public or protected to access the private method.for both (public or private) section iam getting the same result.
    CLASS CL DEFINITION.
    *protected section.
      public section.
    DATA: M TYPE I VALUE 100.
    private SECTION.
    METHODS: FREE.
    ENDCLASS.
      CLASS CL IMPLEMENTATION.
       METHOD: FREE.
         WRITE:/ M.
         ENDMETHOD.
      ENDCLASS.
    CLASS CL1 DEFINITION INHERITING FROM CL.
    public section.
    METHODS: FREE1.
    ENDCLASS.
      CLASS CL1 IMPLEMENTATION.
         METHOD: FREE1.
         WRITE:/ M.
         ENDMETHOD.
      ENDCLASS.
    DATA: OBJ  TYPE REF TO CL1.
      START-OF-SELECTION.
      CREATE OBJECT : OBJ.
      END-OF-SELECTION.
      CALL METHOD: OBJ->FREE1.
    Please use meaningful subject in future questions and Post in correct forum*
    Please learn to use  tags around your ABAP
    Edited by: Vijay Babu Dudla on Dec 1, 2008 12:37 AM
    Edited by: Matt on Dec 1, 2008 4:16 PM

    hi,
        Iam really soory people..It wont repeat again.pls guide me in this regard
    hi ppl,
    what is the difference if i declare attributes under public or protected to access the private method.for both (public or private) section iam getting the same result.
    CLASS CL DEFINITION.
    *protected section.
    public section.
    DATA: M TYPE I VALUE 100.
    private SECTION.
    METHODS: FREE.
    ENDCLASS.
    CLASS CL IMPLEMENTATION.
    METHOD: FREE.
    WRITE:/ M.
    ENDMETHOD.
    ENDCLASS.
    CLASS CL1 DEFINITION INHERITING FROM CL.
    public section.
    METHODS: FREE1.
    ENDCLASS.
    CLASS CL1 IMPLEMENTATION.
    METHOD: FREE1.
    WRITE:/ M.
    ENDMETHOD.
    ENDCLASS.
    DATA: OBJ TYPE REF TO CL1.
    START-OF-SELECTION.
    CREATE OBJECT : OBJ.
    END-OF-SELECTION.
    CALL METHOD: OBJ->FREE1.
    Edited by: Matt on Dec 1, 2008 4:18 PM

  • Flex mxml components should be private by default

    Flex mxml components should be private by default. Does adobe
    plan to fix this in future versions?

    Just noticed this and I think he may have a valid point here.
    But as well as reducing coupling the term I'd use to make this
    argument is
    encapsulation.
    There's no way AFAIK to make MXML sub components invisible to
    higher level components. This can sometimes reveal things
    internally that you don't want messed with, within a custom
    component. If you have a custom component that only requires
    one property be set to configure it properly, you don't want
    to be revealing all these extra sub-components just because they
    had to have ids assigned to them inside the custom component.
    This may be a headache for backwards compatibility, for
    anyone who has assumed these components would be public by default,
    but a simple "scope='public'" attribute should fix that. But even
    having them public by default, and allowing us to set their scope
    to private would be helpful at times.

  • Public/private keys

    How to create a private/public keys?
    Fred

    Hi Fred,
    Following are the steps required are to create a Public/Private Keys:
    1. Load the security provider (if not configured in $JAVAHOME/jre/lib/security/java.security)
    2. Obtain a handle to a secure random number generator.
    3. Obtain a handle to KeyPairGenerator for a specific public key algorithm.
    4. Generate the public/private key pair
    5. Extract the public and private keys
    The following example shows how to generate public and private keys using the KeyPairGenerator and KeyPair interfaces using JCSI's security provider.
    import java.security.*;
    // Load JCSI's JCA security provider
    Security.addProvider(new com.dstc.security.provider.DSTC());
    // Seed random number generator using the default seeding
    // "SHA1PRNG" = SHA1 Pseudo-random number generator
    SecureRandom random = SecureRandom.getInstance("SHA1PRNG");
    // Initialise KeyPairGenerator to create 1024-bit RSA keys.
    // PK Algorithm = "RSA", Security Provider = "DSTC" (Wedgetail)
    KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA", "DSTC");
    keyGen.initialize(1024, random);
    // Generate RSA pulic/private key pair
    KeyPair keyPair = keyGen.genKeyPair();
    // Extract public and private keys
    PrivateKey privKey = keyPair.getPrivate();
    PublicKey pubKey = keyPair.getPublic();
    Hope this will help you.
    Regards,
    Anil.
    Techncial Support Engineer.

  • Deleted the public/private keys installed by iPCU & untrusted the certs

    Hi;
    it's early in the morning and i couldn't quite figure what was going on
    when:
    - new public and private keys "appeared" in keychain
    - a certificate was installed almost as soon as a plugged
    an iphone in while running iPhone Config Util (iPCU i now
    realize)
    From the console:
    Tue Jun 30 02:39:45 unknown mcmobiletunnel[363] <Warning>: added object <NSCFType: 0x1073d0> to keychain as iPCUHost-D3FA2B23-E0D0-4C42-A48B-DFXXXXXXXX-HostCert success 1 error 0
    What it looks like is on connecting the iPhone "phoned home" and snagged a certificate and public and private keys to install on my MacBook Pro.
    I deleted these not realizing who iPCUHost was (an earlier cert was marked as untrusted on a pass trhough my certs earlier).
    OK: so *how* do i recreate the public/private keys? the Certificates in Keychain?
    Tried: downloading and re-installing iPCU
    Tried: Time Machine to earlier version if iPCU & using Software update to Update.
    This is where things look unhappy in the iPCU console:
    Tue Jun 30 03:42:36 unknown mcmobiletunnel[432] <Warning>: received request 4: (\n RequestType\n), keys {\n RequestType = GetProfileList;\n}
    Tue Jun 30 03:42:36 unknown mcmobiletunnel[432] <Warning>: processing request 4: ((\n RequestType\n))
    Tue Jun 30 03:42:36 unknown mcmobiletunnel[432] <Warning>: sending reply {\n OrderedIdentifiers = (\n );\n ProfileManifest = {\n };\n ProfileMetadata = {\n };\n Status = Acknowledged;\n}
    Tue Jun 30 03:42:36 unknown mcmobiletunnel[432] <Error>: receive_message: Could not receive size of message: 0 Operation not permitted
    Tue Jun 30 03:42:36 unknown mcmobiletunnel[432] <Warning>: received request 4: (null), keys (null)
    Tue Jun 30 03:42:36 unknown mcmobiletunnel[432] <Error>: main: Could not receive request from host.
    Tue Jun 30 03:48:21 unknown /usr/libexec/notification_proxy[426] <Error>: Could not receive size of message
    Tue Jun 30 03:48:21 unknown /usr/libexec/notification_proxy[426] <Error>: Could not receive message
    Tue Jun 30 03:51:02 unknown mcmobiletunnel[446] <Warning>: received request 4: (\n RequestType\n), keys {\n RequestType = GetProfileList;\n}
    Tue Jun 30 03:51:02 unknown mcmobiletunnel[446] <Warning>: processing request 4: ((\n RequestType\n))
    Tue Jun 30 03:51:02 unknown mcmobiletunnel[446] <Warning>: sending reply {\n OrderedIdentifiers = (\n );\n ProfileManifest = {\n };\n ProfileMetadata = {\n };\n Status = Acknowledged;\n}
    Tue Jun 30 03:51:02 unknown mcmobiletunnel[446] <Error>: receive_message: Could not receive size of message: 0 Operation not permitted
    Tue Jun 30 03:51:02 unknown mcmobiletunnel[446] <Warning>: received request 4: (null), keys (null)
    Tue Jun 30 03:51:02 unknown mcmobiletunnel[446] <Error>: main: Could not receive request from host.
    Thx
    Jim

    I'm in the same situation here. While trying out the iPCU, I noticed my test devices were showing up with a certificate of "iPCUHost...". I was hoping to replace this default cert with one from our own CA, and in the process of messing around I tried deleting all of those certs from my Keychain. They deleted just fine, and after a sync the cert also disappeared from the connected iPhone. Unfortunately, there is no obvious way to replace that cert and as of now, I cannot install any profile to the device that has had the cert removed. If I select the device and click "Install" on a profile, nothing happens... no errors, no console messages, it just does nothing.
    I'm not quite sure how to replace the missing cert, and in particular how to replace it with one of our own rather than the default. Surely we don't have to actually develop a web service just to install certs... (see page 21 of the Enterprise Deployment Guide)
    -mike

  • Forcing invocation of private/protected methods

    Has anyone, any idea how can be forced the invocation of a private/protected method on a object. The client that invokes the method has a reference to the object and is declared in a different object than the targeted object.
    See code below:
    package src.client;
    import java.lang.reflect.Method;
    import src.provider.CPBook;
    public class Tester {
         public static void main(String [] args) {
              CPBook targetObj = new CPBook();
              Method [] mths = targetObj.getClass().getDeclaredMethods();
              Method targetMth = null;
              for (int i = 0; i < mths.length; i++) {               
                   if ("getMgr".equals(mths.getName())) {
                        targetMth = mths[i];
              if (targetMth != null) {
                   try {
                        Object [] obj = new Object[1];
                        obj[0] = new Boolean(true);
                        targetMth.invoke(b, obj);
                   } catch (Exception e) {                    
                        e.printStackTrace();
    package src.provider;
    public class CPBook {
         public void startDownload() {                    
         public void stopDownload() {     
         protected void getMgr(boolean bool) {
              System.out.println("------- OK ------- : " + bool);
    }Thank you.
    Best regards.

    The class java.lang.reflect.Method has a setAccessible(boolean) method on it. I think that's what you're asking for. Code that makes use of it might run into trouble if a security manager is involved, though. Generally, methods are private for a reason, too, so if your code depends on a private method, it's dependent on an implementation detail it probably shouldn't be concerned about, or even aware of

  • Private protected - ?

    I guess I haven't looked at my Java language spec in awhile (or never did very closely), but I was surprised today to find out that the "protected" specifier allows subclasses as well as any classes in the same package. I feel this is a little too much access for my tastes.
    I guess the idea here is that one developer/group will be desigining a package as a whole and will not do anything advertant or malicious with another class' protected members.
    http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.html
    I noticed that in Java 1.0 also had a fifth specifier as "private protected" that is no longer supported. Was this the sought-after protection that I am looking for? What was the reason for not providing something like this?
    Btw, my C++ is also a little rusty around the details, but does the "protected" specifier do the same thing with namespaces or something?

    The point of such silly code (below) is simply to demonstrate that that no one should be allowed to change the key's code except the Key. If I want to subclass a Key, I shouldn't be forced to make "Key.Code" private and re-implement Code again in my subclass. From an object-oriented perspective, I still feel that "protected" should only be valid from within sub-classes and have a 5th specifier that specifies both package and subclass.
    A colleague of mine pointed out that the "package" specifier is horizontal (across the package), but there is no specifier that is just vertical (only subclasses).
    Is there anything stopping someone to add a package to a class and compile it? For that matter, they now have access to all the protected members of the package classes.
    All classes in the same package :
    package KeyLock;
    class Lock
      public String lockCode = "MySecretKey";
      public Lock(String code)
        lockCode = code;
      protected void tryLock(Key k)
        if(k.getCode().equals(lockCode)
          System.out.println("Success");
        else
          System.out.println("Failure");
    class Key
      protected String Code = "MySecretKey";
      public String getCode()
        return Code;
      public Key()
    public class BetterKey extends Key
      public BetterKey()
        Code = "EvenBetterKey";
    class LockPicker
      public LockPicker()
        Key key1 = new Key();
        Key key2 = new BetterKey();
        Lock lock = new Lock("UselessLock");
        key1.Code = "UselessLock";
        key2.Code = "UselessLock";
        lock.tryKey(key1);
        lock.tryKey(key2);
    }Maybe I'm just spun...

  • Error while creating folder inside the Public & Private Folders

    Dear Gurus,
    I am trying to create a new folder under Public & Private folder. But system is giving the error as " Please enter complete document key. Rollback was unsuccessful; the document is not assigtned to the folder."
    But system is creating the folder outside the Public & Private folder.Created folder is visible only in the serach result. I am not able to delete the folder also from the serach result.
    Request your inputs on how can I solve this issue
    Regards
    Damodar Pai

    Dear Gurus,
    Problem got solved. There is one more table DOST which is linked to DRAW & DRAT. We deleted the vales of DOST & tried. It is wokring now.
    Thanks for your precious inputs.
    Regards
    Damodar Pai
    Edited by: damspai on Aug 25, 2009 9:37 AM

  • Want to change Public, private and vip address on RAC 10g R2 windows 2003

    The network section told us the configuration of the network who support our cluster will have to change all ip address.
    We are looking for a complet document who give all the step by step instructions how to make this change.
    We have to change the Public, private and VIP at the same time of our 3 nodes cluster.
    We know the OCRCFG will be impact. So we will take backup of it first.
    Can someone are able to indicate us how to procede to execute this task.
    Thanks

    Hi,
    i check the Note:283684.1 you give me, but it didn't give all the answers to my problem.
    I finally found a recipe to make the job. I would like to tell you it's not supported be Oracle, but it work very well
    Don't forget to take a good backup of the ocrcfg and vote disk before you start.
    Here we go:
    Stop all Oracle service on all nodes before the change of the address, the low format of the ocrcfg and vote disk
    change the address in the file host in C:\WINDOWS\system32\drivers\etc with the new address
    change the ip address in the window network definition connection with the new address
    ocopy \\.\ocrcfg d:\backup\ocrcfg.dmp
    ocopy \\.\votedsk1 d:\backup\votedsk1.dmp
    rem go to directory of the cluster binary crs\bin
    cd /D D:\Oracle\Ora10g\crs/bin
    rem Format raw ocrcfg and vote disk
    LogPartFormat.exe \\.\ocrcfg /q
    LogPartFormat.exe \\.\votedsk1 /q
    rem Run in prompt mode the cluster setup
    rem crssetup.exe config -nn %s_nodenumberlist% -pn %s_privatenamelist% -ch %ORA_CRS_HOME% -oh %s_OracleHome% -c %s_clustername% -l "%s_languageid%" -q %s_votedisklist% -g %s_usergroup%
    rem example for 2 node
    crssetup.exe config -nn host_name_node_1 ,1,host_name_node_2,2 -pn host_name_node_1-priv,1,host_name_node_2-priv,2 -ch D:\Oracle\Ora10g\crs -oh D:\Oracle\Ora10g\crs -c crs_lab -l "CANADIAN FRENCH_CANADA.WE8MSWIN1252"; -q "\\.\votedsk1"
    rem ensures that all nodes are configured with the same port for the ONS
    racgons.exe add_config host_name_node_1:6200 host_name_node_2:6200
    rem oifcfg to direct components to use specific network interfaces
    oifcfg.exe setif -global "Public"/10.200.5.0:public "Prive"/192.169.255.0:cluster_interconnect
    rem to rebuild the vip address vipca in wondow componant and make the incription in the cluster (in prompt mode or online)
    rem at the same time it will create the gsd and ons service
    vipca.bat -silent -nodelist "host_name_node_1,host_name_node_2" -nodevips "host_name_node_1/host_name_node_1-vip/255.255.255.0/Public,host_name_node_2/host_name_node_2-vip/255.255.255.0/Public";
    rem vipca
    rem check the state of the crs services (inscription)
    crs_stat -t
    rem now make the registration of the listener in the cluster.
    rem important don't use the prompt command below, it will give you a crs-0223 error at the startup service
    Rem to solve this problem use netca on line
    rem crs_register ora.host_name_node_1.LISTENER_host_name_node_1.lsnr -dir D:\Oracle\Ora10g\crs\crs\profile
    rem crs_register ora.host_name_node_2.LISTENER_host_name_node_2.lsnr -dir D:\Oracle\Ora10g\crs\crs\profile
    rem srvctl start nodeapps -n host_name_node_1
    ren srvctl start nodeapps -n host_name_node_2
    netca
    rem check the state of the crs services (inscription)
    crs_stat -t
    rem start oracle object service and cluster volume before registering and accessing to asm services
    sc \\host_name_node_1 start ”Oracle Object Service”
    sc \\host_name_node_1 start OracleClusterVolumeService
    sc \\host_name_node_2 start ”Oracle Object Service”
    sc \\host_name_node_2 start OracleClusterVolumeService
    rem go the the rdbms directory to make the registration of asm and the database
    set ORACLE_HOME=D:\Oracle\Ora10g\rdbms
    rem add the service asm in the cluster in my case asm1 and asm2 for my 2 nodes
    srvctl add asm -n host_name_node_1 -i +ASM1 -o %ORACLE_HOME%
    srvctl add asm -n host_name_node_2 -i +ASM2 -o %ORACLE_HOME%
    rem start the asm service on each node
    srvctl start asm -n host_name_node_1
    srvctl start asm -n host_name_node_2
    rem check the state of the crs services (inscription)
    crs_stat -t
    rem go to the bin directory of rdbms directory to make the registration of the database
    cd /D D:\Logiciels\Oracle\Ora10g\rdbms/bin
    rem register the database (in my case labotary lab) and the to database service (lab1 and lab2) of each node
    srvctl add database -d lab -o %ORACLE_HOME%
    srvctl add instance -d lab -i lab1 -n host_name_node_1
    srvctl add instance -d lab -i lab2 -n host_name_node_2
    rem finally start the database
    srvctl start database -d lab
    rem go to directory of the cluster binary crs\bin
    rem all the services
    cd /D D:\Logiciels\Oracle\Ora10g\crs/bin
    rem you can go in the database with sqlplus and check all your components
    crs_stat -t
    I hope this will help someone who are in the same situation
    Edited by: ron_berube on 2008-12-12 09:21
    Edited by: ron_berube on 2008-12-12 10:08
    Edited by: ron_berube on 2008-12-13 08:25
    Edited by: ron_berube on 2008-12-18 10:49

  • Is a Public/Private Key Pair possible in SAP?

    I have a web service that I would like to run as part of a nightly script. I currently use username/password authentication, but it is not acceptable to have them hard coded, due to Sarbanes-Oxley rules. SAP's site claims to support authentication with x.509 certificates, but is unclear on the implementation details. How could I go about setting up and using a public/private key pair in SAP?

    Not really a portal question, and maybe you'll get a better result in a security forum...
    However, briefly, yes, the AS Java supports X509 certificates as an authentication mechansm. You need to use Visual Admin to generate a server side certificate, then you need the client side to register its own X509 certificate and then in the Java user admin you need to associate the client certificate with a known user. Now when the client executes the web service call it can pass the certificate and the AS Java will back translate the certificate to a real username.

  • Can someone help me in understanding Public ,Private ,VIP&SCAN for RAC11gr2

    Can someone help me in understanding Public ,Private ,VIP&SCAN for RAC11gr2 as i am new to RAC 11gr2 installtion process

    user12085983 wrote:
    Can someone help me in understanding Public ,Private ,VIP&SCAN for RAC11gr2 as i am new to RAC 11gr2 installtion processThe public IP address is assigned dynamically using dynamic host configuration protocol (DHCP), or defined statically in a domain name system (DNS) or in a hosts file. It uses the public interface (the interface with access available to clients).
    Oracle Clusterware uses interfaces marked as private for internode communication.
    The virtual IP (VIP) address is registered in the grid naming service (GNS), or the DNS. Select an address for your VIP that meets the following requirements:
    * The IP address and host name are currently unused (it can be registered in a DNS, but should not be accessible by a ping command)
    * The VIP is on the same subnet as your public interface
    Oracle Database 11g release 2 clients connect to the database using single client access names (SCANs). The SCAN and its associated IP addresses provide a stable name for clients to use for connections, independent of the nodes that make up the cluster. SCAN addresses, virtual IP addresses, and public IP addresses must all be on the same subnet.
    The SCAN is a VIP name, similar to the names used for VIP addresses, such as node1-vip. However, unlike a VIP, the SCAN is associated with the entire cluster, rather than an individual node, and associated with multiple IP addresses, not just one address.

  • What is the difference of  public-read and  public-read protected

    I have noticed that the access of some variables in API document is public-read protected. I tried the following code. They seem all the same.
    class FatherClass{
    public-read var a;
    public-read protected var b;
    init{
        a=1;
        println(a);
        b=1;
        println(b);
    class SubClass extends FatherClass{
        init{
            a=4;
            println(a);
            b=4;
            println(b);
    var subClass=SubClass{};

    As you see in my code, subclass can write the variable with either public-read and public-read protected. What write access do the public-read protected widen? That's because your subclass is in the same script as the variable. Move the subclass to a separate script and it would not be able to write when the access is public-read.
    "public-read" = any code can read, code in the same script can write.
    "public-read protected" = any code can read, code in the same script, in the same package or in a subclass can write.

  • Error: No public or protected classes found to document.

    Hello,
    I am currently going spare trying to get javadoc to document the code I have written. I have checked the Java code given the information on the website and the comments are correct and complete for all methods. The command line I am using is:
    c:\j2sdk1.4.1_01\bin\javadoc.exe -d docs/ Population.javaAnd the makefile (bat file) is in the directory with the population.java file. The command line works with other files in the same directory, programmed and commented to the same standard. The error I get is:
    C:\Documents and Settings\ril\MYDOCU~1\PROGRA~1\JCreator\ILCSFrame>c:\j2sdk1.4.1_01\bin\javadoc.exe -d docs/ Population.java
    Loading source file ILCSFrame.java...
    Constructing Javadoc information...
    Standard Doclet version 1.4.1
    Generating docs/\constant-values.html...
    javadoc: No public or protected classes found to document.
    1 errorI have tried checking the documentation with the doccheck doclet with the following command line:
    c:\j2sdk1.4.1_01\bin\javadoc.exe -doclet com.sun.tools.doclets.doccheck.DocCheck -docletpath C:\j2sdk1.4.1_01\utils\doccheck1.2b1\lib Population.javaBut it throws the following error:
    C:\Documents and Settings\ril\MYDOCU~1\PROGRA~1\JCreator\ILCSFrame>c:\j2sdk1.4.1
    _01\bin\javadoc.exe -doclet com.sun.tools.doclets.doccheck.DocCheck -docletpath
    C:\j2sdk1.4.1_01\utils\doccheck1.2b1\lib\doccheck.jar Population.java
    Loading source file Population.java...
    Constructing Javadoc information...
    javadoc: In doclet class com.sun.tools.doclets.doccheck.DocCheck,  method start
    has thrown an exception java.lang.reflect.InvocationTargetException
    java.lang.NoSuchMethodError: com.sun.tools.doclets.HtmlWriter.<init>(Ljava/lang/
    String;Ljava/lang/String;)V
            at com.sun.tools.doclets.doccheck.HtmlWriterExt.<init>(HtmlWriterExt.jav
    a:16)
            at com.sun.tools.doclets.doccheck.DocCheck.makeWriter(DocCheck.java:1407
            at com.sun.tools.doclets.doccheck.DocCheck.printStatisticsPage(DocCheck.
    java:456)
            at com.sun.tools.doclets.doccheck.DocCheck.printErrorPages(DocCheck.java
    :433)
            at com.sun.tools.doclets.doccheck.DocCheck.startGeneration(DocCheck.java
    :364)
            at com.sun.tools.doclets.doccheck.DocCheck.start(DocCheck.java:337)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:193)
            at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:92)
            at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:301)
            at com.sun.tools.javadoc.Start.begin(Start.java:120)
            at com.sun.tools.javadoc.Main.execute(Main.java:41)
            at com.sun.tools.javadoc.Main.main(Main.java:31)
    1 errorIf I try running doccheck (without doclet) on the whole directory (containing 6 java files), it will only pick up 3 of them (one including the SwingWorker java file). Any help greatly appreciated.

    "No public or protected classes found to document" means
    that the class Population.java is not in the current directory.
    Without trying to insult your programming ability, these things
    come to mind:
    - Omit the slash at the end of "-d docs/" This causes the
    message "Generating docs/\constant-values.html.
    I'm not sure why the bat file uses a forward slash on
    a Windows system.
    - Make sure you cd to the directory containing the bat file before
    running it.
    - Java is case-sensitive (I notice you spelled the filename
    both uppercase and lowercase.) Make sure the file name,
    the class name in the class, and the class name in the bat
    file have the same case.
    As far as doccheck not running, we have not yet released the
    version that runs on 1.4.x. Please write to "doccheck-feedback"
    with "@sun.com" for more info. (I've broken up the email address
    so text crawlers won't get it.)
    -Doug Kramer
    Javadoc team

Maybe you are looking for

  • My ipod was stolen and i need the serial number to denounce, but i dont have anything how i can get the number?

    2 months ago my ipod was stolen for a plummbing men that come to my home, i want to make the report, but i dont have anything to find my serail number, I tried itunes, but didnt find a link that had lead me to my seral number, the old boxes is gone,

  • SDK Beta 7 - Interface Builder Keeps Crashing

    I am running 10.5.3 on a MBP. I was previously running Beta 4 with no problems. After installing SDK Beta 7 I can no longer use Interface Builder. As soon as I scroll the library scrollbar and reach the datepicker object the IB application beachballs

  • Nokia N95 GPS showing different locations and inac...

    First of all, I did all of the following while I am standing stationary under the sky. Okay, so I first went to tools-conect.-landmarks. There i made a new landmark using my current location. Then I went to Nokia Maps but the 'My Position' location(t

  • Time Capsule could not complete back up

    Please help! I've been using my TC for about a year now, and all of a sudden I get a pop up saying: *Time Machine could not complete the backup* The network back up disk could not be accessed because there was a problem with the network username or p

  • CMR in ejb 3.0

    I am getting the following error : Exception Description: Multiple writable mappings exist for the field [ENVINCIDE NTS.INCIDENTS_ID]. Only one may be defined as writable, all others must be spec ified read-only. for the entity bean envincidents: @Id