Skip to content
Advertisement

The encoding ‘UTF-8’ is not supported by the Java runtime

Whenever I start our Apache Felix (OSGi) based application under SUN Java ( build 1.6.0_10-rc2-b32 and other 1.6.x builds) I see the following message output on the console (usually under Ubuntu 8.4):

Warning: The encoding ‘UTF-8’ is not supported by the Java runtime.

I’ve seen this message display occasionally when running both Tomcat and Resin as well. If java supports unicode and UTF-8, what causes this message? I’ve yet to find any reference, or answer to this anywhere else.

Advertisement

Answer

According the documentation “Every implementation of the Java platform is required to support the following standard charsets… US-ASCII, ISO-8859-1, UTF-8, UTF-16BE, UTF-16LE, UTF-16.” So I doubt that Sun have released a build without UTF-8 support.

The actual error message appears to be from here, which is part of the Xerces XML parser. I imagine it is the XML parser where the problem is occurring.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement