Because that first line never prints I think you will find your issue is caused by how you run your program, because if it works in netbeans that that's the only difference.
First open a console window in the folder with your program then run the jar file like normal:
java -jar myapplication.jar
If you simply double click your jar file then it will run instantly, and because there is no console it will close instantly. Java programs that use the console must also be run from the console/command prompt/terminal.
Edit: Just in case, it is worth double checking how you setup your scanner. It should look something like this example: https://stackoverflow.com/a/17691245/1270000
public static void main(String args[]){
Scanner scanner = new Scanner(System.in);
int eid,sid;
String ename;
System.out.println("Enter Employeeid:");
eid=scanner.nextInt();
scanner.nextLine(); //This is needed to pick up the new line
System.out.println("Enter EmployeeName:");
ename=scanner.nextLine();
System.out.println("Enter SupervisiorId:");
sid=(scanner.nextInt());
}