Exception in thread “main” java.lang.ClassFormatError: Invalid pc in LineNumberTable in

Today I got the error message above. Searching on google was not very helpfull. Several options that were mentioned:

  • Use an older version of the JDK (for example from 1.7 to 1.6.
  • Use the command javap to decompile and see what the JVM does

None of these had success. So removed the changes I made. In my case I had added a method with a switch-statement. When I removed this and changed it to a regular if-then-else everything worked fine.

My suggestion when you receive this, undo all your changes and try a different approach. I hope it helps!

Advertisements
Exception in thread “main” java.lang.ClassFormatError: Invalid pc in LineNumberTable in

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s