When I run this in eclipse, it all appears to go well, but after I type either 0 or 1 to select a cipher and hit enter, it just prints the "now enter your ciphertext" stuff and then terminates itself without letting you type anything in.

Any idea why it would terminate before it gets to the second scan? Does it have something to do with eclipse? This is the first project I've ever made in it (Finally switched IDEs) so I don't really know how it's terminal or coding standards or whatever work.

Code:

Code:
package cracker;

import java.util.Scanner;

class crack {
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int cipher;
		String ciphertext;
		int shift;
		int numArray[] = new int[26];
		
		System.out.println("Cipher Cracker - By 323");
		System.out.println("----Written in Java----");
		System.out.println("Version 1.0 -- 5/3/2013");
		System.out.println("What type of Cipher would you like to crack?");
		System.out.println("0 - Caesar Shift Cipher");
		System.out.println("1 - Atbash Cipher");
		cipher = scan.nextInt();
		
		//-----Caesar Shift Cipher Cracker-----//
		
		if (cipher == 0) { 
			System.out.println("Okay, we'll be cracking a Caesar Shift cipher.");
			System.out.println("First, enter your ciphertext (The encrypted text):");
			ciphertext = scan.nextLine(); //user enters ciphertext
			char[] charArray = ciphertext.toCharArray(); //string to char array of ciphertext
			for (int i=0; i < ciphertext.length(); i++) {
				numArray[i] = charArray[i] - 'a' + 1; //put ciphertext into num form
			}
			System.out.println("How much would you like to shift?");
			shift = scan.nextInt(); //set shift to user inputted value
		} 
		
		//-----Atbash Cipher Cracker-----//
		
		else if (cipher == 1) { 
			System.out.println("Okay, we'll be cracking an Atbash cipher.");
			System.out.println("Please enter your ciphertext (The encrypted text):");
			ciphertext = scan.nextLine(); //user enters ciphertext
			char[] charArray = ciphertext.toCharArray(); //string to char array of ciphertext
			for (int i=0; i < ciphertext.length(); i++) {
				numArray[i] = charArray[i] - 'a' + 1; //put ciphertext into num form
			}
			for (int i=0; i < ciphertext.length(); i++) {
				System.out.println(charArray[i]);
				System.out.println(numArray[i]);
			}
		}
		
		//-----Error Handling-----//
		
		else { //in case user enters errornous input
			System.out.println("How did you even get here? ERRCODE: ELSE-C");
		}
		
		scan.close();
	}
}