Problem with JAVA_HOME and ANDROID_HOME

hi, mi issue is that if I launch appium-doctor it says thats all is correctly. However, if I launch a session in Appium it says that JAVA_HOME is not set. Can someone help me?