title: Runnable Jar file is not running on double click
body: <p>I have a simple Java project, which has a file Input.java. The code for Input.java goes like this -</p>
  
  <pre><code>package com.src.functionalities;
  
  import java.util.Scanner;
  
  public class Input {
  
      public static void main(String[] args) {
          // TODO Auto-generated method stub
          Scanner reader = new Scanner(System.in);  // Reading from System.in
          System.out.println("Enter a number: ");
          int n = reader.nextInt(); // Scans the next token of the input as an int.
          System.out.println("You have provided : " + n);
       }
  
      }
  </code></pre>
  
  <p>Now, I have created an executable jar file in Eclipse by  Export -> Jar -> Executable jar file and named the jar file as test.jar.</p>
  
  <p>Now, when I try to open it via command prompt, it works perfectly fine.</p>
  
  <pre><code>java -jar test.jar
  </code></pre>
  
  <p>But, I was expecting to open the command prompt when I double click on the runnable jar file. 
  What is the problem here?</p>
  
  <p>Thanks!</p>