# Failed to install java.nio.charset.UnsupportedCharsetException

**URL:** <https://discourse.processing.org/t/failed-to-install-java-nio-charset-unsupportedcharsetexception/33291>\
**Category:** Processing.py\
**Created:** [November 3, 2021, 9:08pm UTC](https://discourse.processing.org/t/failed-to-install-java-nio-charset-unsupportedcharsetexception/33291 "2021-11-03T21:08:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jim-Plaxco-Artsnova](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jim-plaxco-artsnova/32/2753_2.png) [@Jim-Plaxco-Artsnova](https://discourse.processing.org/u/Jim-Plaxco-Artsnova)\
**Post date:** [November 3, 2021, 9:08pm UTC](https://discourse.processing.org/t/failed-to-install-java-nio-charset-unsupportedcharsetexception/33291/1 "2021-11-03T21:08:26Z")

</div>

Hi everyone,  
Just tried to run Processing in Python mode for the first time in Windows 7 and get the following error:

**Failed to install ‘’: java.nio.charset.UnsupportedCharsetException: cp0.**

Looking around it seems that this is something of a common problem across all versions of Processing (including v4). Has there ever been a fix for Windows systems put in place? The only thing I could find was a reference to using preferences.txt to add the following:

**run.options=-Dpython.console.encoding=UTF-8**

but that has no impact on my system as I still get the same error message.

Note that I have also tried to get Processing.py to work on Linux. While it seems that 3.5.4 works, 4.0 fails.

Thanks

---

<div class="post-metadata">

**Author:** ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)\
**Post date:** [November 3, 2021, 9:27pm UTC](https://discourse.processing.org/t/failed-to-install-java-nio-charset-unsupportedcharsetexception/33291/2 "2021-11-03T21:27:13Z")

</div>

I’m afraid I haven’t tested Python Mode on Windows 7, so I couldn’t comment. Windows 10 support seems fine.

For now, Python Mode officially supports Processing 3. If you’d like to install it for Processing 4, I compiled this _unofficial, experimental_ version: [https://github.com/tabreturn/processing.py-for-processing-4](https://github.com/tabreturn/processing.py-for-processing-4)

But I recommend Processing 3.5.4 for Python Mode.

You can also try [py5](https://py5.ixora.io/) as an alternative Python interface for Processing.

---

<div class="post-metadata">

**Author:** ![Jim-Plaxco-Artsnova](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jim-plaxco-artsnova/32/2753_2.png) [@Jim-Plaxco-Artsnova](https://discourse.processing.org/u/Jim-Plaxco-Artsnova)\
**Post date:** [November 3, 2021, 10:58pm UTC](https://discourse.processing.org/t/failed-to-install-java-nio-charset-unsupportedcharsetexception/33291/3 "2021-11-03T22:58:36Z")

</div>

> [@Jim-Plaxco-Artsnova](#):
>
> -Dpython.console.encoding=UTF-8

I had high hopes that this would work but I’m still getting the same error message.

---

<div class="post-metadata">

**Author:** ![villares](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/villares/32/3166_2.png) [@villares](https://discourse.processing.org/u/villares)\
**Post date:** [November 3, 2021, 11:05pm UTC](https://discourse.processing.org/t/failed-to-install-java-nio-charset-unsupportedcharsetexception/33291/4 "2021-11-03T23:05:31Z")

</div>

I know this is kind of terrible, but maybe you could try to emulate a Linux box using [VirtualBox.org](http://virtualbox.org/) and this OVA file:  
[https://drive.google.com/file/d/1mJExrCPgrwlOpSgFHQ56oJbEUGfuySKg/view](https://drive.google.com/file/d/1mJExrCPgrwlOpSgFHQ56oJbEUGfuySKg/view)

---

<div class="post-metadata">

**Author:** ![Jim-Plaxco-Artsnova](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jim-plaxco-artsnova/32/2753_2.png) [@Jim-Plaxco-Artsnova](https://discourse.processing.org/u/Jim-Plaxco-Artsnova)\
**Post date:** [November 3, 2021, 11:41pm UTC](https://discourse.processing.org/t/failed-to-install-java-nio-charset-unsupportedcharsetexception/33291/5 "2021-11-03T23:41:34Z")

</div>

Additional research seems to point the finger at Jython. I tried running Processing from the DOS command line after setting the code page to UTF-8 (chcp 65001) but that made no difference.

I found this observation at [https://bugs.jython.org/issue2222](https://bugs.jython.org/issue2222) enlightening:

_Jython’s sys module looks in several places for the console encoding. If nothing tells it the encoding explicitly, it asks Java, here:_  
_[jython: 4ed64dc6c895 src/org/python/core/PySystemState.java](https://hg.python.org/jython/file/4ed64dc6c895/src/org/python/core/PySystemState.java#l829)_  
_… Unfortunately, when Windows returns code page zero, Java claims to know that the encoding is cp0. [jdk8/jdk8/jdk: 687fd7c7986d src/windows/native/java/io/Console\_md.c](http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/687fd7c7986d/src/windows/native/java/io/Console_md.c#l61)_  
._. Note: in Eclipse you need to set ‘-Dpython.console.encoding=UTF-8’ to “Installed JREs”. Not in eclipse.ini._

FYI it was because Processing was relying on Jython that I avoided doing anything with Processing.py.

---

<div class="post-metadata">

**Author:** ![Jim-Plaxco-Artsnova](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jim-plaxco-artsnova/32/2753_2.png) [@Jim-Plaxco-Artsnova](https://discourse.processing.org/u/Jim-Plaxco-Artsnova)\
**Post date:** [November 4, 2021, 12:02am UTC](https://discourse.processing.org/t/failed-to-install-java-nio-charset-unsupportedcharsetexception/33291/6 "2021-11-04T00:02:41Z")

</div>

> [@Jim-Plaxco-Artsnova](#):
>
> Jython’s sys module looks in several places for the console encoding

Does anyone know if Jython config settings ([Settings - JythonWiki](https://wiki.python.org/jython/Settings)) can be added to the \modes\PythonMode\mode.properties file? I actually did try this but only got the same error message.

---

<div class="post-metadata">

**Author:** ![Jim-Plaxco-Artsnova](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jim-plaxco-artsnova/32/2753_2.png) [@Jim-Plaxco-Artsnova](https://discourse.processing.org/u/Jim-Plaxco-Artsnova)\
**Post date:** [November 4, 2021, 12:04am UTC](https://discourse.processing.org/t/failed-to-install-java-nio-charset-unsupportedcharsetexception/33291/7 "2021-11-04T00:04:53Z")

</div>

Thanks but I’d rather not go down that rabbit hole.

---

<div class="post-metadata">

**Author:** ![villares](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/villares/32/3166_2.png) [@villares](https://discourse.processing.org/u/villares)\
**Post date:** [November 4, 2021, 12:07am UTC](https://discourse.processing.org/t/failed-to-install-java-nio-charset-unsupportedcharsetexception/33291/8 "2021-11-04T00:07:46Z")

</div>

> [@Jim-Plaxco-Artsnova](#):
>
> FYI it was because Processing was relying on Jython that I avoided doing anything with Processing.py.

Try [https://py5.ixora.io](https://py5.ixora.io) right now, Processing + CPython 3 FTW! 😃

---

<div class="post-metadata">

**Author:** ![Jim-Plaxco-Artsnova](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jim-plaxco-artsnova/32/2753_2.png) [@Jim-Plaxco-Artsnova](https://discourse.processing.org/u/Jim-Plaxco-Artsnova)\
**Post date:** [November 4, 2021, 12:16am UTC](https://discourse.processing.org/t/failed-to-install-java-nio-charset-unsupportedcharsetexception/33291/9 "2021-11-04T00:16:07Z")

</div>

Cool. I’ll give that a try.

My conclusion is that Processing.py simply will never work on my Windows 7 system since the Jython is self-contained and the code page information is hard coded therein. I have not been able to identify a way to communicate to Jython the necessary code page information. For folks whose system code page setting matches what is defined within the Jython package, this should be a non-issue.
