Microsoft SDK for Java

J0201-J0220

J0201 J0202 J0203
J0204 J0205 J0206
J0207 J0208 J0209
J0210 J0211 J0212
J0213 J0214 J0215
J0216 J0217 J0218
J0219 J0220  

J0201 - 'super' cannot be qualified except as a superclass constructor call

The compiler detected the usage of the super keyword with an instance of the superclass preceding it to access a field or method of the superclass. Using an instance of a superclass along with the keyword super is limited to referencing a superclass constructor when the superclass has inner classes defined.

J0202 - 'super()' cannot be qualified; superclass 'identifier' is not an inner class

The compiler has detected a call to a superclass constructor using an instance of the superclass but the superclass is not an inner class. The usage of an instance of a superclass with the super keyword is only valid when the superclass is an inner class.

The following example illustrates this error.

class Simple{
   //Do something meaningful here
}
class NotSimple extends Simple
{
   NotSimple(Simple smp){
      smp.super();
      /*error: cannot call 'super' with instance when
        superclass does not contain inner classes*/
   }
}

J0203 - Cannot access protected member 'identifier' in class 'identifier' from class 'identifier'

The compiler has detected an attempt to access a protected member from a class in a different package. Classes that reside in separate packages cannot refer to protected members unless you are subclassing a class in the other package

J0204 - Cannot access protected member 'identifier' in class 'identifier' through a qualifier of type 'identifier'

The compiler detected that a class in one package that is extending a class in another package, attempted to access a protected member of the base class using an instance of the base class. This error most likely occurs when a class attempts to access members of its base class through an instance other than or super.

J0205 - Cannot use non-final local variable 'identifier' from a different method

The compiler detected that a local variable, which was not declared as final, was referenced in a method. This error can occur if an inner class is defined in a method declaration and the inner class attempts to reference a parameter or local variable passed to the method.

The following example illustrates this error.

public class Simple{
   void method1(int var1){
      class InnerClass{
         boolean getVar1(){
           return(var1 == 1);
           /*error cannot reference local variable of
                   method from within inner class. */
         }
      }
   }
}

J0206 - Cannot assign a second value to blank final variable 'identifier'

The compiler detected an attempt to assign a value to a final variable more than once. This error most likely occurs when a blank final variable is initialized more than once in constructor or initializer. Check for duplicate initializations of the final variable mentioned in the error message, and then compile again.

J0207 - Cannot assign blank final variable 'identifier' in a loop

The compiler detected that a final variable was assigned a value from within the scope of a program control loop. A final variable can only be assigned a value once and thus cannot be initialized within a loop. Move the initialization of the final variable specified in the error message outside of the loop and ensure that it is initialized only once.

The following example illustrates this error.

public class Simple{
   final int x;
   
   public Simple(){
      for (int z=0;z<10;z++){
         x = z; /*error: cannot assign final variable
                  in loop */
      }
   }
}

J0208 - Constructor or instance initializer must assign a value to blank final variable 'identifier'

The compiler detected that a final variable was declared but never assigned a value in either an initializer or constructor. For a variable to be properly declared final, it must be assigned a value.

J0209 - Expected '='

The compiler detected that an "=" was missing from a comment tag (for example @com, @security, @dll) attribute. This error most often occurs when an equal sign is missing from an attribute in a comment tag declaration. This error could also occur if another symbol or character obscures the "=" sign from being evaluated by the compiler. Check to make sure all comment tag attributes have proper "=" signs applied, and then compile again.

The following example illustrates this error.

/**@com.interface(iid 31415926-5358-9793-2384-612345678901)*/
//error: missing equal sign in 'iid' parameter
interface Itest{
   //Do something meaningful here
}

J0210 - Expected '.'

The compiler detected that the specified comment tag's declaration (for example @com) is missing a period (.) after the comment tag. This error can also occur if another symbol or character obscures the period symbol from being evaluated by the compiler. Check to make sure your comment tag declaration contains a period after the comment tag, and then compile again.

The following example illustrates this error.

/**@com class*/
//error: missing '.' from @com statement
public class Simple{
   //Do something meaningful here
}

J0211 - Not used

This error message is currently not used.

J0212 - Not used

This error message is currently not used.

J0213 - Not used

This error message is currently not used.

J0214 - Invalid GUID specified

The compiler detected that an @com attribute that uses a GUID was incorrect. This can be caused by a syntax error in entering the GUID. Check the syntax for the GUID, and then compile again.

J0215 - Syntax error in @com declaration

A syntax error was found in the specified @com declaration. This is most often caused by incorrectly typing the declaration. Check the syntax of the @com declaration, and then compile again.

J0216 - @com attribute 'identifier' on 'identifier' is illegal in this context

The compiler has detected that a value assigned to an attribute within an @com declaration is illegal. This error most often occurs when an attribute is specified but usage of the attribute requires that other specific attributes be specified. This error can also occur if an attribute is specified in the wrong location within an @com declaration. The following list illustrates some examples of when this can occur.

J0217 - @com attribute 'identifier' was not specified for 'identifier' but is required in this context

The compiler has detected an attribute for the @com declaration shown in the error is missing, and is required for this type of declaration. Each type of @com declaration has attributes that are required. Check the documentation on @com for more details on what attributes are required for the @com declaration that is listed in the error message.

The following example illustrates this error.

/**@com.class() */
//error: must specify iid for @com.class
public class Simple{
   //Do something here
}

J0218 - @com attribute 'identifier' on 'identifier' has an invalid value

The compiler has detected that the value specified in the error message is either not the correct type for the attribute specified in the error or is outside the valid ranges for the error. Check the value assigned to the specified attribute, and then compile again.

J0219 - An @com attribute cannot be placed on member 'identifier' unless the containing class also has an @com attribute

The compiler has detected that an @com declaration was placed on a member of a class or interface but the class or interface was not declared with an @com declaration. Check to make sure the class or interface that contains the method specified in the error has a valid @com declaration defined.

The following example illustrates this error.

interface Simple{
   /**@com.method(dispid=777) */
   public void method1();
   /*error: interface does not have an @com comment tag
            assigned*/
}

J0220 - An @com attribute cannot be placed on static member 'identifier'

The compiler detected that an @com declaration was placed on a static member of a class. Static members cannot be exposed through COM. Remove the static keyword from the method or field, and then compile again.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.