Forum Stats

  • 3,723,348 Users
  • 2,244,533 Discussions
  • 7,850,425 Comments

Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Platform restriction: a parameter list's length cannot exceed 254

I get this error compiling some Scala code based on the Java 8 jdk. It looks like the JVM has a restriction of no more that 254 parameters on a method which is the root cause of this error message. I've not been able to find much on this error. Is the 254 parameter limit treated as an issue that is being fixed in a late Java release or has it already been addressed in a more recent version. I've got the 1.8.0_151 version installed.

Answers

  • Unknown
    edited May 2018
    I get this error compiling some Scala code based on the Java 8 jdk. It looks like the JVM has a restriction of no more that 254 parameters on a method which is the root cause of this error message. I've not been able to find much on this error. Is the 254 parameter limit treated as an issue that is being fixed in a late Java release or has it already been addressed in a more recent version. I've got the 1.8.0_151 version installed. 

    The obvious question is why you would even want that many parameters for a method.

    It is NOT a bug - it is defined in the JVM spec to be a limit of 255.

    https://docs.oracle.com/javase/specs/jvms/se10/jvms10.pdf

    See page 166

    (The parameters_count item is one byte because a method descriptor is limited to 255 parameters.)
Sign In or Register to comment.