SPARK-2602 [BUILD] Tests steal focus under Java 6
SPARK-2602 [BUILD] Tests steal focus under Java 6

As per https://issues.apache.org/jira/browse/SPARK-2602 , this may be resolved for Java 6 with the java.awt.headless system property, which never hurt anyone running a command line app. I tested it and seemed to get rid of focus stealing.

Author: Sean Owen <srowen@gmail.com>

Closes #1747 from srowen/SPARK-2602 and squashes the following commits:

b141018 [Sean Owen] Set java.awt.headless during tests

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