[BUILD] make-distribution should find JAVA_HOME for non-RHEL systems
[BUILD] make-distribution should find JAVA_HOME for non-RHEL systems

## What changes were proposed in this pull request?

make-distribution.sh should find JAVA_HOME for Ubuntu, Mac and other non-RHEL systems

## How was this patch tested?

Manually

Author: Felix Cheung <felixcheung_m@hotmail.com>

Closes #16363 from felixcheung/buildjava.

holdenk/spark,huang1900/spark,cin/spark,zuotingbing/spark,pgandhi999/spark,sachintyagi22/spark,taroplus/spark,cin/spark,jrshust/spark,bdrillard/spark,ericvandenbergfb/spark,icexelloss/spark,srowen/spark,tengpeng/spark,nchammas/spark,rekhajoshm/spark,WeichenXu123/spark,huang1900/spark,zero323/spark,darionyaphet/spark,facaiy/spark,ioana-delaney/spark,minixalpha/spark,nchammas/spark,saltstar/spark,dongjoon-hyun/spark,mdespriee/spark,dbtsai/spark,ConeyLiu/spark,pgandhi999/spark,UndeadBaneGitHub/spark,ajaysaini725/spark,wzhfy/spark,hvanhovell/spark,hvanhovell/spark,loneknightpy/spark,panfengfeng/spark,vinodkc/spark,ron8hu/spark,apache/spark,nlalevee/spark,JerryLead/spark,nchammas/spark,akopich/spark,narahari92/spark,bdrillard/spark,sahilTakiar/spark,xuanyuanking/spark,ron8hu/spark,mzl9039/spark,esi-mineset/spark,darionyaphet/spark,techaddict/spark,narahari92/spark,kiszk/spark,vinodkc/spark,patrick-nicholson/spark,hhbyyh/spark,pgandhi999/spark,sahilTakiar/spark,zuotingbing/spark,SHASHANKB/spark,stanzhai/spark,shubhamchopra/spark,darionyaphet/spark,loneknightpy/spark,liyichao/spark,witgo/spark,JoshRosen/spark,eyalfa/spark,ddna1021/spark,HyukjinKwon/spark,apache-spark-on-k8s/spark,wangyum/spark,vinodkc/spark,wzhfy/spark,ddna1021/spark,JoshRosen/spark,darionyaphet/spark,techaddict/spark,lvdongr/spark,dongjoon-hyun/spark,publicRoman/spark,cin/spark,zzcclp/spark,gengliangwang/spark,MLnick/spark,mzl9039/spark,jlopezmalla/spark,stanzhai/spark,MLnick/spark,janewangfb/spark,liyichao/spark,liutang123/spark,zhouyejoe/spark,nlalevee/spark,markhamstra/spark,wangmiao1981/spark,darionyaphet/spark,debugger87/spark,jiangxb1987/spark,adrian-ionescu/apache-spark,saturday-shi/spark,rezasafi/spark,lvdongr/spark,rikima/spark,caneGuy/spark,aray/spark,LantaoJin/spark,goldmedal/spark,jlopezmalla/spark,byakuinss/spark,highfei2011/spark,tejasapatil/spark,apache-spark-on-k8s/spark,jkbradley/spark,bdrillard/spark,rikima/spark,bdrillard/spark,nchammas/spark,michalsenkyr/spark,ioana-delaney/spark,skonto/spark,nlalevee/spark,skonto/spark,ron8hu/spark,saturday-shi/spark,WindCanDie/spark,shaneknapp/spark,actuaryzhang/spark,jianran/spark,WeichenXu123/spark,publicRoman/spark,zero323/spark,shubhamchopra/spark,huang1900/spark,rezasafi/spark,JerryLead/spark,liutang123/spark,caneGuy/spark,JerryLead/spark,JerryLead/spark,ron8hu/spark,hvanhovell/spark,kevinyu98/spark,lvdongr/spark,1haodian/spark,shubhamchopra/spark,SHASHANKB/spark,panfengfeng/spark,brad-kaiser/spark,WindCanDie/spark,1haodian/spark,rekhajoshm/spark,tengpeng/spark,zero323/spark,andrewor14/spark,xuanyuanking/spark,liyichao/spark,rezasafi/spark,jlopezmalla/spark,huang1900/spark,ahnqirage/spark,ptkool/spark,srowen/spark,poffuomo/spark,dongjoon-hyun/spark,maropu/spark,bdrillard/spark,kevinyu98/spark,jiangxb1987/spark,saturday-shi/spark,holdenk/spark,sureshthalamati/spark,szhem/spark,alunarbeach/spark,nilsgrabbert/spark,liyichao/spark,LantaoJin/spark,kevinyu98/spark,gengliangwang/spark,map222/spark,taroplus/spark,huang1900/spark,lxsmnv/spark,brad-kaiser/spark,saltstar/spark,jianran/spark,techaddict/spark,cin/spark,actuaryzhang/spark,jrshust/spark,adrian-ionescu/apache-spark,liyichao/spark,WeichenXu123/spark,saturday-shi/spark,mike0sv/spark,sahilTakiar/spark,ptkool/spark,cloud-fan/spark,panfengfeng/spark,jiangxb1987/spark,ConeyLiu/spark,taroplus/spark,shuangshuangwang/spark,liutang123/spark,zhouyejoe/spark,wangyum/spark,apache-spark-on-k8s/spark,WeichenXu123/spark,zhouyejoe/spark,alunarbeach/spark,shaneknapp/spark,markhamstra/spark,JoshRosen/spark,tejasapatil/spark,dbtsai/spark,rezasafi/spark,skonto/spark,panfengfeng/spark,jiangxb1987/spark,patrick-nicholson/spark,loneknightpy/spark,xflin/spark,caneGuy/spark,HyukjinKwon/spark,saturday-shi/spark,aokolnychyi/spark,aokolnychyi/spark,rekhajoshm/spark,xuanyuanking/spark,dhruve/spark,jlopezmalla/spark,ueshin/apache-spark,wangmiao1981/spark,facaiy/spark,kissmetrics/spark,liutang123/spark,cin/spark,jlopezmalla/spark,SHASHANKB/spark,milliman/spark,apache-spark-on-k8s/spark,LantaoJin/spark,bOOm-X/spark,ajaysaini725/spark,publicRoman/spark,bOOm-X/spark,caneGuy/spark,sahilTakiar/spark,wzhfy/spark,HyukjinKwon/spark,stanzhai/spark,chuckchen/spark,saltstar/spark,icexelloss/spark,rikima/spark,apache/spark,LantaoJin/spark,hhbyyh/spark,debugger87/spark,rednaxelafx/apache-spark,BryanCutler/spark,caneGuy/spark,bOOm-X/spark,nlalevee/spark,kiszk/spark,UndeadBaneGitHub/spark,shuangshuangwang/spark,UndeadBaneGitHub/spark,ptkool/spark,zhouyejoe/spark,akopich/spark,sahilTakiar/spark,vinodkc/spark,akopich/spark,xflin/spark,BryanCutler/spark,sachintyagi22/spark,map222/spark,liutang123/spark,guoxiaolongzte/spark,sachintyagi22/spark,saltstar/spark,szhem/spark,ahnqirage/spark,jianran/spark,bravo-zhang/spark,icexelloss/spark,kiszk/spark,jianran/spark,SHASHANKB/spark,dongjoon-hyun/spark,alunarbeach/spark,saltstar/spark,ajaysaini725/spark,wzhfy/spark,brad-kaiser/spark,narahari92/spark,xflin/spark,sureshthalamati/spark,patrick-nicholson/spark,panfengfeng/spark,jrshust/spark,shubhamchopra/spark,HyukjinKwon/spark,ioana-delaney/spark,facaiy/spark,lxsmnv/spark,bdrillard/spark,guoxiaolongzte/spark,mzl9039/spark,WeichenXu123/spark,sureshthalamati/spark,apache/spark,MLnick/spark,ioana-delaney/spark,ahnqirage/spark,dhruve/spark,michalsenkyr/spark,nchammas/spark,shuangshuangwang/spark,Aegeaner/spark,narahari92/spark,witgo/spark,tengpeng/spark,apache/spark,yanboliang/spark,minixalpha/spark,lvdongr/spark,techaddict/spark,wzhfy/spark,debugger87/spark,rekhajoshm/spark,MLnick/spark,nilsgrabbert/spark,liyichao/spark,eyalfa/spark,esi-mineset/spark,ajaysaini725/spark,jrshust/spark,ajaysaini725/spark,LantaoJin/spark,spark-test/spark,byakuinss/spark,zero323/spark,UndeadBaneGitHub/spark,maropu/spark,maropu/spark,minixalpha/spark,dbtsai/spark,nchammas/spark,bravo-zhang/spark,ioana-delaney/spark,ioana-delaney/spark,tejasapatil/spark,apache-spark-on-k8s/spark,mahak/spark,map222/spark,sureshthalamati/spark,dongjoon-hyun/spark,wangmiao1981/spark,rekhajoshm/spark,janewangfb/spark,stanzhai/spark,kissmetrics/spark,shaneknapp/spark,someorz/spark,jkbradley/spark,mahak/spark,hhbyyh/spark,patrick-nicholson/spark,witgo/spark,BryanCutler/spark,yanboliang/spark,highfei2011/spark,nilsgrabbert/spark,aray/spark,jiangxb1987/spark,joseph-torres/spark,sachintyagi22/spark,xuanyuanking/spark,shaneknapp/spark,jiangxb1987/spark,srowen/spark,dhruve/spark,cin/spark,ptkool/spark,ddna1021/spark,rekhajoshm/spark,janewangfb/spark,rednaxelafx/apache-spark,witgo/spark,taroplus/spark,tejasapatil/spark,adrian-ionescu/apache-spark,tejasapatil/spark,milliman/spark,mahak/spark,bOOm-X/spark,bdrillard/spark,narahari92/spark,spark-test/spark,highfei2011/spark,cloud-fan/spark,rednaxelafx/apache-spark,taroplus/spark,shuangshuangwang/spark,someorz/spark,bOOm-X/spark,Aegeaner/spark,rezasafi/spark,aray/spark,liyichao/spark,ajaysaini725/spark,WindCanDie/spark,aosagie/spark,JoshRosen/spark,sureshthalamati/spark,guoxiaolongzte/spark,kevinyu98/spark,gengliangwang/spark,jlopezmalla/spark,lvdongr/spark,hhbyyh/spark,dbtsai/spark,janewangfb/spark,milliman/spark,map222/spark,bOOm-X/spark,brad-kaiser/spark,debugger87/spark,ahnqirage/spark,mike0sv/spark,michalsenkyr/spark,xuanyuanking/spark,JerryLead/spark,vinodkc/spark,andrewor14/spark,icexelloss/spark,setjet/spark,minixalpha/spark,aosagie/spark,zhouyejoe/spark,ueshin/apache-spark,kissmetrics/spark,stanzhai/spark,michalsenkyr/spark,lxsmnv/spark,mike0sv/spark,skonto/spark,ericvandenbergfb/spark,aokolnychyi/spark,nilsgrabbert/spark,JoshRosen/spark,spark-test/spark,HyukjinKwon/spark,milliman/spark,pgandhi999/spark,wangyum/spark,aosagie/spark,wangyum/spark,shaneknapp/spark,darionyaphet/spark,jkbradley/spark,apache/spark,dhruve/spark,jkbradley/spark,JerryLead/spark,brad-kaiser/spark,kiszk/spark,rikima/spark,nlalevee/spark,1haodian/spark,ericvandenbergfb/spark,rikima/spark,zero323/spark,aokolnychyi/spark,zzcclp/spark,wangyum/spark,cin/spark,maropu/spark,joseph-torres/spark,debugger87/spark,icexelloss/spark,janewangfb/spark,pgandhi999/spark,dhruve/spark,joseph-torres/spark,tengpeng/spark,mzl9039/spark,byakuinss/spark,zero323/spark,ConeyLiu/spark,kevinyu98/spark,narahari92/spark,dhruve/spark,hhbyyh/spark,shuangshuangwang/spark,hhbyyh/spark,mzl9039/spark,SHASHANKB/spark,sureshthalamati/spark,stanzhai/spark,markhamstra/spark,wzhfy/spark,publicRoman/spark,michalsenkyr/spark,BryanCutler/spark,rednaxelafx/apache-spark,tengpeng/spark,mahak/spark,aosagie/spark,WeichenXu123/spark,ueshin/apache-spark,goldmedal/spark,joseph-torres/spark,yanboliang/spark,holdenk/spark,setjet/spark,jkbradley/spark,Aegeaner/spark,vinodkc/spark,srowen/spark,aosagie/spark,UndeadBaneGitHub/spark,alunarbeach/spark,cloud-fan/spark,ueshin/apache-spark,milliman/spark,mahak/spark,jkbradley/spark,UndeadBaneGitHub/spark,kevinyu98/spark,saltstar/spark,someorz/spark,icexelloss/spark,dbtsai/spark,map222/spark,cloud-fan/spark,lxsmnv/spark,rikima/spark,actuaryzhang/spark,panfengfeng/spark,highfei2011/spark,mdespriee/spark,markhamstra/spark,aray/spark,szhem/spark,guoxiaolongzte/spark,adrian-ionescu/apache-spark,markhamstra/spark,actuaryzhang/spark,liutang123/spark,mzl9039/spark,1haodian/spark,setjet/spark,wangmiao1981/spark,yanboliang/spark,xuanyuanking/spark,MLnick/spark,michalsenkyr/spark,aray/spark,MLnick/spark,minixalpha/spark,WindCanDie/spark,mike0sv/spark,aokolnychyi/spark,mike0sv/spark,mdespriee/spark,rezasafi/spark,srowen/spark,someorz/spark,guoxiaolongzte/spark,yanboliang/spark,spark-test/spark,aokolnychyi/spark,lvdongr/spark,szhem/spark,nlalevee/spark,shaneknapp/spark,jrshust/spark,kissmetrics/spark,dongjoon-hyun/spark,debugger87/spark,zhouyejoe/spark,rikima/spark,shuangshuangwang/spark,alunarbeach/spark,publicRoman/spark,markhamstra/spark,dhruve/spark,rednaxelafx/apache-spark,ron8hu/spark,JoshRosen/spark,jkbradley/spark,alunarbeach/spark,szhem/spark,rekhajoshm/spark,patrick-nicholson/spark,gengliangwang/spark,1haodian/spark,bravo-zhang/spark,sahilTakiar/spark,loneknightpy/spark,BryanCutler/spark,guoxiaolongzte/spark,BryanCutler/spark,ioana-delaney/spark,eyalfa/spark,yanboliang/spark,shubhamchopra/spark,publicRoman/spark,skonto/spark,patrick-nicholson/spark,byakuinss/spark,JerryLead/spark,chuckchen/spark,apache/spark,hhbyyh/spark,saltstar/spark,goldmedal/spark,kissmetrics/spark,mahak/spark,poffuomo/spark,ConeyLiu/spark,minixalpha/spark,stanzhai/spark,lvdongr/spark,zero323/spark,jiangxb1987/spark,byakuinss/spark,xflin/spark,MLnick/spark,spark-test/spark,mdespriee/spark,bOOm-X/spark,actuaryzhang/spark,setjet/spark,someorz/spark,zuotingbing/spark,skonto/spark,hvanhovell/spark,bravo-zhang/spark,mike0sv/spark,zzcclp/spark,ConeyLiu/spark,srowen/spark,adrian-ionescu/apache-spark,gengliangwang/spark,mdespriee/spark,milliman/spark,sachintyagi22/spark,poffuomo/spark,akopich/spark,wangmiao1981/spark,witgo/spark,chuckchen/spark,apache-spark-on-k8s/spark,goldmedal/spark,poffuomo/spark,facaiy/spark,tejasapatil/spark,shaneknapp/spark,icexelloss/spark,minixalpha/spark,esi-mineset/spark,pgandhi999/spark,ptkool/spark,LantaoJin/spark,apache-spark-on-k8s/spark,eyalfa/spark,tengpeng/spark,eyalfa/spark,janewangfb/spark,spark-test/spark,shubhamchopra/spark,pgandhi999/spark,sachintyagi22/spark,sahilTakiar/spark,shubhamchopra/spark,andrewor14/spark,ericvandenbergfb/spark,jianran/spark,techaddict/spark,wangyum/spark,yanboliang/spark,someorz/spark,ptkool/spark,tejasapatil/spark,goldmedal/spark,witgo/spark,esi-mineset/spark,guoxiaolongzte/spark,sureshthalamati/spark,nchammas/spark,esi-mineset/spark,bravo-zhang/spark,cloud-fan/spark,chuckchen/spark,byakuinss/spark,map222/spark,gengliangwang/spark,setjet/spark,techaddict/spark,SHASHANKB/spark,lxsmnv/spark,wangyum/spark,JoshRosen/spark,wzhfy/spark,xflin/spark,adrian-ionescu/apache-spark,someorz/spark,mdespriee/spark,maropu/spark,kiszk/spark,goldmedal/spark,lxsmnv/spark,cloud-fan/spark,srowen/spark,chuckchen/spark,alunarbeach/spark,lxsmnv/spark,holdenk/spark,mdespriee/spark,esi-mineset/spark,jianran/spark,bravo-zhang/spark,LantaoJin/spark,zuotingbing/spark,andrewor14/spark,rednaxelafx/apache-spark,saturday-shi/spark,ericvandenbergfb/spark,holdenk/spark,michalsenkyr/spark,holdenk/spark,ueshin/apache-spark,loneknightpy/spark,poffuomo/spark,facaiy/spark,mike0sv/spark,huang1900/spark,saturday-shi/spark,nlalevee/spark,aosagie/spark,rezasafi/spark,techaddict/spark,xflin/spark,sachintyagi22/spark,SHASHANKB/spark,szhem/spark,WindCanDie/spark,setjet/spark,gengliangwang/spark,brad-kaiser/spark,Aegeaner/spark,1haodian/spark,chuckchen/spark,BryanCutler/spark,ahnqirage/spark,hvanhovell/spark,ahnqirage/spark,bravo-zhang/spark,aray/spark,ron8hu/spark,andrewor14/spark,zzcclp/spark,panfengfeng/spark,dongjoon-hyun/spark,publicRoman/spark,zzcclp/spark,vinodkc/spark,HyukjinKwon/spark,WeichenXu123/spark,kissmetrics/spark,jrshust/spark,1haodian/spark,aokolnychyi/spark,dbtsai/spark,caneGuy/spark,ahnqirage/spark,kevinyu98/spark,taroplus/spark,Aegeaner/spark,facaiy/spark,szhem/spark,aosagie/spark,mzl9039/spark,eyalfa/spark,joseph-torres/spark,aray/spark,ddna1021/spark,tengpeng/spark,debugger87/spark,taroplus/spark,xuanyuanking/spark,eyalfa/spark,andrewor14/spark,zhouyejoe/spark,highfei2011/spark,nilsgrabbert/spark,skonto/spark,matthewfranglen/spark,Aegeaner/spark,joseph-torres/spark,zuotingbing/spark,markhamstra/spark,hvanhovell/spark,nilsgrabbert/spark,ericvandenbergfb/spark,ueshin/apache-spark,map222/spark,spark-test/spark,mahak/spark,UndeadBaneGitHub/spark,ericvandenbergfb/spark,actuaryzhang/spark,facaiy/spark,milliman/spark,maropu/spark,apache/spark,chuckchen/spark,jrshust/spark,xflin/spark,loneknightpy/spark,cloud-fan/spark,huang1900/spark,esi-mineset/spark,kissmetrics/spark,shuangshuangwang/spark,loneknightpy/spark,darionyaphet/spark,dbtsai/spark,akopich/spark,akopich/spark,zuotingbing/spark,zzcclp/spark,witgo/spark,ConeyLiu/spark,setjet/spark,ConeyLiu/spark,actuaryzhang/spark,brad-kaiser/spark,wangmiao1981/spark,andrewor14/spark,maropu/spark,rednaxelafx/apache-spark,adrian-ionescu/apache-spark,jianran/spark,ueshin/apache-spark,highfei2011/spark,wangmiao1981/spark,jlopezmalla/spark,ddna1021/spark,ptkool/spark,nilsgrabbert/spark,Aegeaner/spark,liutang123/spark,zuotingbing/spark,kiszk/spark,ddna1021/spark,goldmedal/spark,byakuinss/spark,patrick-nicholson/spark,zzcclp/spark,holdenk/spark,narahari92/spark,poffuomo/spark,akopich/spark,joseph-torres/spark,ajaysaini725/spark,caneGuy/spark,poffuomo/spark,WindCanDie/spark,hvanhovell/spark,janewangfb/spark,highfei2011/spark,ron8hu/spark,ddna1021/spark,HyukjinKwon/spark,kiszk/spark,WindCanDie/spark