Site Tools


Smart Card Solution

User Manual

JavaCard API Samples

Java Card Specification

Knowledge Sharing


7.5.56 invokestatic

Invoke a class (static) method






invokestatic = 141 (0x8d)


…, [arg1, [arg2 …]] → …


The unsigned indexbyte1 and indexbyte2 are used to construct an index into the constant pool of the current package ( Section 3.5, Frames), where the value of the index is (indexbyte1 , an instance initialization method, or , a class or interface initialization method. It must be static, and therefore cannot be abstract.

The resolved method includes the code for the method, an unsigned byte nargs that may be zero, and the method's modifier information.

The operand stack must contain nargs words of arguments, where the number of words of arguments and the type and order of the values they represent must be consistent with those of the resolved method.

The nargs words of arguments are popped from the operand stack. A new stack frame is created for the method being invoked, and the words of arguments are made the values of its first nargs words of local variables, with arg1 in local variable 0, arg2 in local variable 1, and so on. The new stack frame is then made current, and the Java Card virtual machine pc is set to the opcode of the first instruction of the method to be invoked. Execution continues with the first instruction of the method.

javacard/jcvm/7.5.56_invokestatic.txt · Last modified: 2017/05/13 04:09 (external edit)