Windows GUI in a Mac, how do I do that?

edited September 2016 in Arduino

I have a GUI that was built with Processing on a Windows 10 machine. I need to be able to use it with a Mac.

How do I export it so I can use it on a Mac.


  • As far as I know, support for that no longer exists. You need a machine running MacOS for that.

  • @Lord_of_the_Galaxy --

    If @AntonioLlamas has the sketch, he can open it in Processing on Mac and use File > Export > Mac OS X. Processing 3 on Mac can export for Mac, Linux, or Windows.

    Are you saying that P3 on Windows can only export for Windows?

  • @jeremydouglass I am saying that P3 on Windows can only export for Windows and Linux, and yes, you can export for all three supported operating system types in from a MacOS running machine.
    Earlier, however, it was possible to export for MacOS using a Windows system( I don't remember when, but it was before P3).

  • @AntonioLlamas:

    How do I export it so I can use it on a Mac?

    It sounds like the current approach is:

    1. Copy the sketch to a Mac
    2. Install Processing
    3. File > Export the sketch to Mac app.
    4. Done!
  • @AntonioLlamas @jeremydouglass has provided the only possible way to do it.

  • @AntonioLlamas

    Maybe it is possible to do what you want using the command line option. I haven't tried that option so maybe you can tell us if it works.


    processing-java.exe --help

    Command line edition for Processing 0251 (Java Mode)

    --help Show this help text. Congratulations.

    --sketch= Specify the sketch folder (required)
    --output= Specify the output folder (optional and
    cannot be the same as the sketch folder.)

    --force The sketch will not build if the output
    folder already exists, because the contents
    will be replaced. This option erases the
    folder first. Use with extreme caution!

    --build Preprocess and compile a sketch into .class files.
    --run Preprocess, compile, and run a sketch.
    --present Preprocess, compile, and run a sketch in presentation mode.

    --export Export an application.
    --no-java Do not embed Java. Use at your own risk!
    --platform Specify the platform (export to application only).
    Should be one of 'windows', 'macosx', or 'linux'.

    The --build, --run, --present, or --export must be the final parameter passed to Processing. Arguments passed following one of those four will be passed through to the sketch itself, and therefore available to the sketch via the 'args' field. To pass options understood by PApplet.main(), write a custom main() method so that the preprocessor does not add one.

  • Unrelated question - how can it work without embedding Java? What does that even mean?

  • Java is the programming language that runs the sketch, as you know. If you "embed it" you make a complete copy of the exact version of the Java language needed to run the sketch (e.g. 1.8) and put it into the application.

    If you don't embed it, you leave it out. Now the sketch could still work -- but only if the computer it is run on happens to have the right version of Java already installed and accessible in a way that when the sketch says "java" it will use the system version and run correctly. That is why: "use at your own risk!"

  • OK, I didn't know that. So, all Windows machines don't come with JRE pre-installed? Or is it to prevent problems from a different versions of Java?

  • Exactly -- the issue is precisely that many different machines:

    1. may not have Java pre-installed at all, or
    2. not have it installed in a way that is accessible to an unprivileged user (e.g. a computer lab machine), or
    3. may have the accessible Java be a different version installed than is expected by a Sketch written in a particular version of Processing -- 1.6, 1.7, 1.8 etc.

    You can solve all these problems by embedding the Java that you need. Or you can hope that the machine has it, makes it available, and has the right version -- at your own risk.

  • Thanks for your help!

    I'm going to make sure java is pre-installed and I'll let you know what happens.

  • Sorry I took so long to post. Thanks Jeremydouglass. I was finally able to do it and it works perfectly.

  • edited December 2016


    I thought like you till today, but now i want to precise that EVEN using embedded java can be a problem with MAC:

    -- Let us suppose that you have an app exported with P5 3.X, that means that you have an OS > 10.7.3 (lion...) If you try to play this app on a mac running 10.6... ((snow leopard) it does not run, saying "this app is supposed to run with 10.7.3 or more" - And it is not POSSIBLE to install new java versions on osX 10.6...

    -- Now, same result if you choose (always with P3X) to export WITHOUT embedding java and try to launch it on osX 10.6 (less than 10.7.3): it does not work: because P3X use java 8 and needs at least 10.7.3 as said.

    -- LAST EXPERIENCE= i take the same code and put it in P5 1.5.1 on a MAC running 1.6.8 (some little changes, openGL and so on) : the code works; i export it for MAC and try to launch the app on the most recent OS Mac i have (El Capitan, java 1.8): Result is that IT RUNS very well!

    --STRANGE CONCLUSION : I do know that if people try to launch this last version without having java installed it will fail but it tells you why ("you have to install java"...); anyway as for MAC it seems that there is NOT an absolute solution and that using the "old" P5 1.5.1(when it is possible of course) is more flexible...

    As for windows or linux i dont know... But as i have a "collection" of MAC running a lot of OS versions, i have tested.

  • @akenaton -- this is also correct.

    Embedding Java will solve many problems, as described above -- but only if the embedded Java is able to run on the operating system, according to its system requirements.

    From: What are the system requirements for Java:

    • Java 8 System Requirements
      • Mac OS X: Intel-based Mac running Mac OS X 10.8.3+, 10.9+
    • Java 7 System Requirements
      • Mac OS X: Intel-based Mac running Mac OS X 10.7.3 (Lion) or later.
  • Are you saying it's impossible to update Java if your OSX version is too old???

    Anyway, I made an app in an external IDE, exported it as a runnable .jar and it runs fine on Windows, Linux and Mac provided a sufficiently recent version of Java is installed. I have faith that if you can make your sketch run on Linux (which you can test out yourself if you have Windows by using a VM) it should work on OSX. I had a minor issue where I used "\" as the folder separator instead of "/" and it worked on Windows but not on Linux.

    With "have faith" I mean if somebody tells me otherwise I will put my hands over my ears and start singing loudly until that person goes away.

    It's a bit annoying that they removed the feature to export as a runnable .jar from the Processing IDE.

  • edited December 2016

    Are you saying it's impossible to update Java if your OSX version is too old???

    "Minimum system requirements" means that Java does not release a version of Java 7 that runs on 10.7.2 or earlier, and it does not release a version of Java 8 that runs on 10.8.2 or earlier. Those version numbers are the "minimum" system that Java requires. This is also true for Linux, Windows -- any operating system that supports Java. Java 9 will almost certainly have an even higher minimum system requirement -- e.g. OS X 10.10 (or whatever).

  • edited December 2016

    @jeremydouglass, don't count on Java 9 too soon. I-)
    Its main attraction, Project Jigsaw, is postponing its release. :-&
    Actually, I'd stay away from Java 9 as much as I can! =;
    I foresee lotsa library incompatibility ahead!!! :-t

  • So, Processing will stick to Java 8? Or will the next big release use Java 9?

  • Dunno. I was just warning about Java 9's ongoing development issues. ~O)

  • @jeremydouglass=== finding a lot of workarounds i finally installed java I.7 on a mac running 10.6.8 but i is a headache and i decided to leave when 1.8 was delivered...Don't speak about 1.9!

Sign In or Register to comment.