Java code not working? (FileInputStream, StringTokenizer, String to primitive type conversion) : my code is just not working. The text file is in the same folder as my classes. I used the pathname, which worked, but I don't think that would work if I send the file to someone else. And converting the Strings to primitive type using parse methods isn't working, either. Not sure what I'm doing wrong. Can anyone help? Here is my code:

    import java.util.Scanner;
    import java.util.StringTokenizer;
    import java.io.FileNotFoundException;
    import java.io.FileInputStream;
    
    public class TestInventory {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		Inventory movieList = new Inventory();
		Scanner inputStream = null;
		try{
			inputStream = new Scanner(new FileInputStream("movies_db.txt"));
		}
		catch(FileNotFoundException e){
			System.out.println("File not found or could not be opened");
			System.exit(0);
			
		}
		while(inputStream.hasNextLine()){
			String s = inputStream.nextLine();
			StringTokenizer st = new StringTokenizer(s, " - ");
			String t1 = st.nextToken();
			String t2 = st.nextToken();
			String t3 = st.nextToken();
			String t4 = st.nextToken();
			int y = Integer.parseInt(t2);
                        double r = Double.parseDouble(t4);
                        int d = Integer.parseInt(t3);
			Movie m = new Movie(t1, y, r, d);
			movieList.addMovie(m);
		}
		
