GitToTheHub commented on PR #1795: URL: https://github.com/apache/cordova-android/pull/1795#issuecomment-2764653094
> > ### Build without JAVA_HOME or CORDOVA_JAVA_HOME > > You wrote: > > > When running cordova build, if JAVA_HOME is missing, its expected to not continue as its apart of the requirement checks. > > > > > > When I didn't set anything I can build successfully. The `java` command is still available, maybe it's working because of this. > > Here is example of what I mean by builds wont work when `JAVA_HOME` is missing. > > ``` > % echo $JAVA_HOME > /Users/cordova/.sdkman/candidates/java/current > > % unset JAVA_HOME > % echo $JAVA_HOME > > % cordova build android > Checking Java JDK and Android SDK versions > ANDROID_HOME=/Users/erisu/Library/Android/sdk (recommended setting) > ANDROID_SDK_ROOT=/Users/erisu/Library/Android/sdk (DEPRECATED) > Failed to find 'JAVA_HOME' environment variable. Try setting it manually. > ``` > > Build failed the requirement check and stopped. I did it like you wrote, but the build succeded: ```bash % echo $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home % unset JAVA_HOME % echo $JAVA_HOME % cordova build android Checking Java JDK and Android SDK versions ANDROID_HOME=/Users/manuelbeck/Library/Android/sdk (recommended setting) ANDROID_SDK_ROOT=undefined (DEPRECATED) Using Android SDK: /Users/manuelbeck/Library/Android/sdk Reading build config file: /Users/manuelbeck/Projekte/app_entwicklung/abfuhr_app/build.json Reading the keystore from: /Users/manuelbeck/Projekte/app_entwicklung/abfuhr_app/Signierung/Android/netactive.keystore BUILD SUCCESSFUL in 261ms ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org