setting JAVA_HOME in Thonny to Java 11

340 views
Skip to first unread message

Alexandre Villares

unread,
Jul 23, 2021, 2:39:31 PM7/23/21
to thonny
Hi!

I love Thonny and use it for teaching. I also use other tools and IDEs like Processing Python Mode (sadly Jython 2.7). There is this amazing new experimental library that also combines the Processing wonderful vocabulary for drawing with modern Python, using the jpype library, it's called py5 (https://tabreturn.github.io/code/python/thonny/2021/06/21/thonny_and_py5.html). I hope (perhaps with help from someone from this group) to have one day a plugin for making py5 use easier.

But let me get to the point. I have Java 11 installed but I can't make jpype inside Thonny find it, it just sees Java 8. I'm on Linux, my terminal sees it, the shell from Thonny doesn't. I've tried the Environment Variables setting under Options... Can someone help me?

thanks in advance,
Alexandre
screen1.png
screen2.png

Aivar Annamaa

unread,
Jul 23, 2021, 4:36:24 PM7/23/21
to thonny
Hi!

From the first screenshot I see that you are setting JAVA_HOME, but checking for JAVA_PATH. From the both screenshots I see that you are omitting the initial slash from the value of JAVA_HOME. I believe JAVA_HOME must be an absolute path.

So, I recommend you re-check your environment variables first. If it doesn't help, then let's dig further.

Best regards,
Aivar

Alexandre Villares

unread,
Jul 23, 2021, 5:43:35 PM7/23/21
to thonny
Thanks for the pointers, Aivar! Solved!

`JAVA_HOME=/home/villares/miniconda3/envs/py5coding/`  solved it!
screen4.png
Reply all
Reply to author
Forward
0 new messages