# Exported application shows grey screen

**URL:** <https://discourse.processing.org/t/exported-application-shows-grey-screen/26324>\
**Category:** Processing\
**Created:** [December 17, 2020, 2:04am UTC](https://discourse.processing.org/t/exported-application-shows-grey-screen/26324 "2020-12-17T02:04:10Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrubesch](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@jrubesch](https://discourse.processing.org/u/jrubesch)\
**Post date:** [December 17, 2020, 2:04am UTC](https://discourse.processing.org/t/exported-application-shows-grey-screen/26324/1 "2020-12-17T02:04:11Z")

</div>

Hi all! I’ve been having problems with exporting the code into an application. When I run the application the only thing that shows up is a blank grey screen. This has happened with all the few programs I’ve tried to export. (They all run perfectly on Processing). Here’s the code of the latest one I tried exporting:

Thanks!

```auto
> boolean game = false;
> boolean ganar = false;
> int xpos, ypos;
> 
> PImage catintro;
> PImage fondo;
> PImage title;
> PImage taco;
> PImage jugar;
> PImage instruccion;
> PImage kitty;
> PImage tacoman;
> PImage gano;
> PImage jugar2;
> 
> Gato []cat;
> int numgato = 200;
> int cualgato;
> 
> Taco man;
> 
> void setup () {
> size (1000, 700);
> //frameRate (120);
> imageMode (CENTER);
> //smooth();
> //background (255);
> 
> 
> catintro = loadImage ("tacocat.png");
> fondo = loadImage ("background.png");
> title = loadImage ("title.png");
> taco = loadImage ("taco intro.png");
> jugar = loadImage ("jugar.png");
> instruccion = loadImage ("instruccion.png");
> kitty = loadImage ("cat juego.png");
> tacoman = loadImage ("taco juego.png");
> 
> gano = loadImage ("gano.png");
> jugar2 = loadImage ("jugar2.png");
> 
> 
> cat = new Gato [numgato];
> for (int c = 0; c<numgato; c++) {
> cat[c] = new Gato (random(width), random(height));
> }
> 
> man = new Taco (random(width), random(height));
> }
> 
> void draw () {
> println (ganar);
> println (game);
> 
> 
> background (fondo);
> //smooth ();
> 
> if (game == false) {
> ganar = false;
> image (title, 500, 350);
> image (catintro, 470, 340);
> image (taco, 540, 340);
> image (instruccion, 500, 380);
> image (jugar, 500, 580);
> //reiniciar();
> } else {
> if (ganar == false) {
> iniciar();
> }
> if (ganar == true) {
> man.encontrado();
> }
> }
> 
> 
> for (int c=0; c<numgato; c++) {
> if (mousePressed == true) {
> if ( (mouseX < (cat[c].xpos + kitty.width/2)) && (mouseX > (cat[c].xpos - kitty.width/2)) && (mouseY < cat[c].ypos + kitty.height/2) && (mouseY > (cat[c].ypos-kitty.height/2))) {
> cat[c].drag();
> }
> }
> }
> }
> 
> void mouseReleased () { //intro title before playing, click boton to play
> if (game == false) {
> if ((mouseX > 400) && (mouseX < 600) && (mouseY > 540) && (mouseY < 620)) {
> game = true;
> }
> }
> if (game == true) {
> if ( (mouseX < (man.xpos + tacoman.width/2)) && (mouseX > (man.xpos - tacoman.width/2)) && (mouseY < (man.ypos + tacoman.height/2)) && (mouseY > (man.ypos-tacoman.height/2))) {
> man.encontrado();
> ganar = true;
> }
> }
> 
> if ((ganar == true) && (game == true)) {
> if ((mouseX > 400) && (mouseX < 600) && (mouseY < 590) && (mouseY > 510)) {
> reiniciar();
> }
> }
> }
> 
> 
> 
> void iniciar () {
> // boolean game = true;
> 
> image (fondo, 500, 350);
> man.move();
> man.dibujar();
> 
> xpos = xpos + 5;
> 
> for (int c = 0; c < numgato; c++) {
> cat[c].move();
> cat[c].dibujar();
> }
> }
> 
> 
> void reiniciar() {
> game = true;
> ganar = false;
> 
> for (int c = 0; c < numgato; c++) {
> cat[c].move();
> cat[c].dibujar();
> cat[c].xpos = random (width);
> cat[c].ypos = random (height);
> }
> 
> man.move();
> man.dibujar();
> man.xpos = random (width);
> man.ypos = random (height);
> xpos = xpos + 5;
> }
> 
> 
> class Gato { //class gato
> float xpos, ypos;
> float xspeed;
> float xdirection = 1;
> 
> Gato (float px, float py) {
> xpos = px;
> ypos = py;
> }
> 
> void move() {
> xspeed = random (2, 7);
> xpos = xpos + (xspeed * xdirection);
> 
> if (xpos > 1100) {
> xpos = -100;
> xspeed = xspeed + random (-3, 5);
> }
> }
> 
> void dibujar() {
> image (kitty, xpos, ypos);
> }
> 
> void drag () {
> xpos = mouseX;
> ypos = mouseY;
> }
> }
> 
> class Taco { // class taco
> float xpos, ypos;
> PImage tacoman = loadImage ("taco juego.png");
> 
> Taco (float px, float py) {
> xpos = px;
> ypos = py;
> }
> 
> void move () {
> xpos = xpos + (random(5, 10)) ;
> if (xpos > 1100) {
> xpos = -80;
> }
> }
> 
> void dibujar () {
> image (tacoman, xpos, ypos);
> }

  void encontrado () {
    ganar = true;

    image (gano, 500, 350);
    image (jugar2, 500, 550);
  }
}

```

---

<div class="post-metadata">

**Author:** ![CodeMasterX](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/codemasterx/32/2942_2.png) [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Post date:** [December 17, 2020, 7:37am UTC](https://discourse.processing.org/t/exported-application-shows-grey-screen/26324/2 "2020-12-17T07:37:35Z")

</div>

I am no expert, but this is standard procedure so it should help.

Did you make sure all the files inside of the sketch are intact? Also, did you use the correct settings while exporting? Did you accidentally open an export file that is not the one meant to be open?

Try these things. There is a chance it could work.

---

<div class="post-metadata">

**Author:** ![jrubesch](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@jrubesch](https://discourse.processing.org/u/jrubesch)\
**Post date:** [December 17, 2020, 1:19pm UTC](https://discourse.processing.org/t/exported-application-shows-grey-screen/26324/3 "2020-12-17T13:19:05Z")

</div>

Yeah, all the files are fine. What do you mean by correct settings? I have a mac and I only exported once for Mac. That didn´t work…

---

<div class="post-metadata">

**Author:** ![CodeMasterX](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/codemasterx/32/2942_2.png) [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Post date:** [December 17, 2020, 1:22pm UTC](https://discourse.processing.org/t/exported-application-shows-grey-screen/26324/4 "2020-12-17T13:22:33Z")

</div>

I haven’t exported many times before so I forgot there are no settings. Try updating your Java. It said that there may be some issues if your java is old

---

<div class="post-metadata">

**Author:** ![jrubesch](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@jrubesch](https://discourse.processing.org/u/jrubesch)\
**Post date:** [December 17, 2020, 1:34pm UTC](https://discourse.processing.org/t/exported-application-shows-grey-screen/26324/5 "2020-12-17T13:34:35Z")

</div>

I updated Java. Still doesn´t work…

---

<div class="post-metadata">

**Author:** ![CodeMasterX](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/codemasterx/32/2942_2.png) [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Post date:** [December 17, 2020, 2:11pm UTC](https://discourse.processing.org/t/exported-application-shows-grey-screen/26324/6 "2020-12-17T14:11:24Z")

</div>

I don’t know then. Guess I can’t help

---

<div class="post-metadata">

**Author:** ![MiguelSanches](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/miguelsanches/32/11172_2.png) [@MiguelSanches](https://discourse.processing.org/u/MiguelSanches)\
**Post date:** [December 17, 2020, 3:55pm UTC](https://discourse.processing.org/t/exported-application-shows-grey-screen/26324/7 "2020-12-17T15:55:47Z")

</div>

Hi @jrubesch,

Welcome to the forum!

If your sketch run’s on the PDE it should run on the application as well (Assuming you are on OS machine).

I noticed that you import images to your sketch, can you check that the data folder that contains the images in the application folder has all images? Some of them might be missing or might not be exported into the standalone applications folders. If this is the case you can manually moved the images into the application folder

---

<div class="post-metadata">

**Author:** ![jrubesch](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@jrubesch](https://discourse.processing.org/u/jrubesch)\
**Post date:** [December 18, 2020, 12:23am UTC](https://discourse.processing.org/t/exported-application-shows-grey-screen/26324/8 "2020-12-18T00:23:25Z")

</div>

I found the mistake! It was because I had the images/files in the folder of the code, not a data folder. The code runs fine on Processing like that, but I guess to export everything needs to be in the data folder. I moved everything to Data and it exported perfectly - for all the programs I’ve had problems with too!
