title: Getting "The selection cannot be launched, and there are no recent launches" prompt message while running a Java Project in Eclipse
body: <p>I'm making a program to find the integer that is middle in value in java.  It doesn't seem to work and I can't launch it. It is giving me this error <code>" the selection cannot be launched, and there are no recent launches"</code>.  Here is an image in the link, scene I don't have enough reps. </p>
  
  <p><img src="https://i.imgur.com/PuuBQXg.png" alt="Image of error on Imgur"></p>
  
  <p>I have tried to recreate another project, but it also didn't work. It gave me the same error. Below is the code:</p>
  
  <pre><code>public class J1 {
  
  public static void main(int[] ar) {
      //define variables
      int i;
      int large;
      int small;
      //Program
      for (i = 1; i &lt; ar.length; i++) {
          int x = ar[i];
          int y = ar[i - 1];
              if (x &gt; y){
                  x = large;
              }
              else if(x &lt; y){
                  x = small;
              }
              else {
                  continue;
              }
          }
  
      //after the for loop
  
  
  }
  
  }
  </code></pre>