Java: Illegal UTF8 string in constant pool in class file
September 7, 2014 Leave a comment
While working on the GNU ARM Eclipse project, I ran into a nasty problem, out of the blue the Eclipse used for tests started to behave strangely, refusing to load a class responsible for depicting some debug views.
Checking the Eclipse logs, I noticed the following message:
Illegal UTF8 string in constant pool in class file ...
Although this does not seem to be related to the project content, I checked the source files for any class path or import misconfigurations, but found none.
My concern was that the development Eclipse got broken, and I need to re-install it from scratch, but fortunately the solution was much easier and involved only removing the Java temporary files.
For this, it is necessary to go to the System Preferences and start the separate Java control panel; here, in the Temporary Internet File section, click the Settings… button:
In the new Temporary File Settings window, click the Restore Defaults button:
Your mileage may vary, but after this action, at least in my case, the problem vanished, and Eclipse no longer complained.