How to display java swing on X11 when running on Mac

为君一笑 提交于 2019-12-07 07:23:41

问题


I would really like to be able to run our test suite on Xvfb so that swing windows don't keep popping up in the way of my work. Unfortunately I cannot seem to find a way to get the java runtime to use the display specified in the DISPLAY environment variable. I suppose this is because the Mac JDK is hardwired to use the (non-X-based) Mac display.

I can't find any switches for the java command that say to use X either.

Thanks in advance for any help you can give! Matt


回答1:


I don't know if there is a way to get Apple's JDK to use X11, but there is the alternative of using SoyLatte, which is a Mac Java implementation that only works with X11.




回答2:


Try to start your application from within the X11 terminal. This worked for http://mcis.polymtl.ca/makao.html for me on MacOS 10.14.5



来源:https://stackoverflow.com/questions/897054/how-to-display-java-swing-on-x11-when-running-on-mac

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!