tabreturn / thonny-py5mode

A py5 plug-in for Thonny
Do What The F*ck You Want To Public License
23 stars 8 forks source link

JAVA_HOME environment variable #54

Closed walterreiner closed 9 months ago

walterreiner commented 9 months ago

Hi!, I am having problems with Py5 in Thonny.

py5 is unable to start a Java 17 Virtual Machine. This library requires Java 17 to be installed and a properly set JAVA_HOME environment variable. Here is some debug info about your installation that might help you identify the source of this problem. {'JAVA_HOME environment variable': '/Users/-------/Library/Thonny/jdk-17', 'jvm version': (0, 0, 0), 'default jvm path': '/Users /-------/Library/Thonny/jdk-17/Contents/Home/lib/libjli.dylib'}

when I run java -version in terminal

java version "20.0.2" 2023-07-18 Java(TM) SE Runtime Environment (build 20.0.2+9-78) Java HotSpot(TM) 64-Bit Server VM (build 20.0.2+9-78, mixed mode, sharing)

I don't understand what to do, thanks for the help

walterreiner commented 9 months ago

Ok, i fix my problem folowing this amazing tutotrial

https://www.youtube.com/watch?v=-ecG6B_jNW8

So now its running, sorry for the issues.

Bye!

villares commented 9 months ago

Hi @walterreiner! Sorry to hear about your trouble. Let's see if we can get some help. Meanwhile, can you confirm which OS are you running on? From the path I'd guess MacOS...

Now I'm going to tell you things that helped me before... I'd ask you to check on Thonny 's menu Tools > Options... > General if you have something in "environment variables" like this: (similar but different as I'm on Linux)

image

If you have, can you check if it leads to a valid path/place with a JDK? Can you change it so it points to a valid JDK path? Then you need to close and restart Thonny.

(I wonder if it could even be pointing to your JRE 20 if you can find it, it might also work)

walterreiner commented 9 months ago

Hi Alexandre, its is working now!!! how can i close the issue?

villares commented 9 months ago

I'll close it for you!

hx2A commented 9 months ago

Thank you, @villares , and @walterreiner , have fun programming with py5!