Bug 531 : main() argument --display=n does not appear to be working on OS X
Last modified: 2008-10-21 09:42



Daniel Shiffman
Assigned To:

Attachment Type Created Size Actions

Description:   Opened: 2007-03-05 10:35
Using v. 124, I have a very simple test that runs a PApplet in present mode
on a machine with dual video. With:

display = 1 --> the applet shows up on the main screen
display = 2 --> the applet shows up on the main screen

display = anything else --> message says "Display N does not exist, using
the default display instead."

Here is the example code:

package VideoWall.processing;

import processing.core.PApplet;

public class FullScreenTest extends PApplet{

public void setup(){

public void draw(){

static public void main(String args[]) {
PApplet.main(new String[] { "--present",
Additional Comment #1 From fry 2007-03-07 17:24
can you verify that you're on a mac? i've not tested this with dual head
mac yet, it was written for dual head pc originally (no that it should be
different har har har). and if you have access to a dual head pc, check on
that one to see if it works there or if it's just completely broken?

also, what version of java are you using?
Additional Comment #2 From Daniel Shiffman 2007-03-19 09:50
I am on a Mac -- Java(TM) 2 Runtime Environment, Standard Edition (build
1.5.0_07-164). Doing some further research and running some non-Processing
tests, everything leads me to believe that multi-monitor support for Java
full-screen exclusive mode is simply not there. So I officially now give
up! (for the time being. . .)
Additional Comment #3 From fry 2007-03-23 13:28
wow, really? what a bummer. have you tried any of the other full-screen
exclusive mode java examples?

also, have you tried different versions of java? i.e. early releases of
java 1.4 on 10.2 couldn't do full screen ex at all, but they've since
patched it with 10.3 and later, whcih tells me that things aren't all that
ducky but are prolly wildly different between releases.
Additional Comment #4 From balter 2008-10-21 09:21
I suspect there is a bug in the code generating the source code. The main method looks like

static public void main(String args[])

but it should be:

static public void main(String[] args)

with the brackets after String instead of after args
Additional Comment #5 From fry 2008-10-21 09:42
No, that's not a bug. That syntax is identical. Also, this works fine on
Windows, it just needs to be tracked down on OS X.