public static void main(String[] args) {
		File[] files = null;

		if (args.length > 0) {
			files = new File[args.length];
			for (int i = 0; i < args.length; i++)
				files[i] = new File(args[i]);
		} else {
			JFileChooser chooser = new JFileChooser();

			chooser.setMultiSelectionEnabled(true);

			File cwd = new File(System.getProperty("user.home"));
			chooser.setCurrentDirectory(cwd);

			int returnVal = chooser.showOpenDialog(null);

			if (returnVal == JFileChooser.APPROVE_OPTION)
				files = chooser.getSelectedFiles();
			else
				System.exit(1);
		}

		if (files == null || files.length == 0)
			System.exit(0);
		
		Arrays.sort(files);

		for (int i = 0; i < files.length; i++) {
			JPLEphemeris ephemeris = null;

			try {
				System.out.println("----- Loading file " + files[i].getName() + " -----");
				ephemeris = new JPLEphemeris(files[i]);
			} catch (JPLEphemerisException jee) {
				jee.printStackTrace();
				System.err.println("JPLEphemerisException ... " + jee);
				System.exit(1);
			} catch (IOException ioe) {
				ioe.printStackTrace();
				System.err.println("IOException ... " + ioe);
				System.exit(1);
			}

			testEphemeris(ephemeris);
		}

		System.exit(0);
	}