문제

I've got regression tests of a Java system that don't bring up any graphical elements but do make use of the AWT event thread. Is there any way I can set things up to run this test suite in the background on my workstation without it constantly grabbing focus from whatever else I'm working on? (I'm running this on a mac.)

도움이 되었습니까?

해결책

다른 팁

Try running java with -Djava.awt.headless=true parameter. This should work for you if you are not using any graphical elements. Hopefully, it will prevent the program from grabbing focus while it is running.

java -Djava.awt.headless=true

Here are some links with more information:

http://www.macosxhints.com/article.php?story=20071208235352641

You could execute these tests with a virtual desktop, virtual machine (like VMWare) or virtual frame buffer. I'm not sure about Mac, but on Linux it works great with xvfb.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top