tabreturn/thonny-py5mode

Variable JAVA_HOME not detected automatically

Closed this issue · 6 comments

I've succeeded to install and use the thonny-py5mode library, but only once I've modified the JAVA_HOME variable, which is written in the "Options" window. Its value is visible with an: echo $JAVA_HOME at the terminal command prompt. It would be much easier for beginners if a startup, or install script would detect and processes the existing variable.

Hi @claudefalbriard, thanks for opening this issue. Could you please state for the record the Thonny version, plugin-version and OS you are working on?
I'd like to try some debugging when we have the time, because the plug-in was supposed to write the right information.
Can you replicate de initial circumstances and show the wrong value?
Cheers!

Enclosed you find the version information of my system. The issue reported refers to the detection of an already installed JAVA JDK using the JAVA_HOME variable. All other install steps worked OK.

Linux Version with lsb_release -a
Description: Ubuntu 17.10, Release: 17.10, 64-bit

Conda version: conda 4.6.14

echo $JAVA_HOME
/home/claude/java/jdk-17

java --version (with an already existing installation)
openjdk 17.0.2 2022-01-18
OpenJDK Runtime Environment (build 17.0.2+8-86)
OpenJDK 64-Bit Server VM (build 17.0.2+8-86, mixed mode, sharing)

Python 3.9.5 64-bit
Thonny 3.3.7

pip show py5
Name: py5, Version: 0.10.0a0

Cheers @claudefalbriard !

Can you please check echo $JAVA_HOME inside the shell opened by Thonny on the "Open System Shell..." menu?
It is a shell with special configurations made by Thonny and if it works we can close this issue.

Hi @claudefalbriard ! I'm inclined to close this, can you confirm things are working for you on Ubuntu?

The proposed installation sequence is:

  • Install Thonny using this bash script: https://thonny.org/installer-for-linux
  • Install py5 from the Thonny "Manage Packages..." interface
  • Install thonny-py5mode plug-in from the "Manage Plug-ins" interface
  • Activate the plug-in using the Thonny py5 menu, imported mode for py5 (that will install the JDK on first run)
  • Note that the JAVA_HOME in Thonny is only "visible" for the Thonny interpreter/environment

OK, I'll close this for now, and if you find issues in the future we can open a new one!