private void loadFile(String fileName) {
        try {
            KnowledgeBase newKnowledgeBase = new KnowledgeBase();

            Reader content = null;
            if (fileName.startsWith("classpath:")) {
                // Skip the "classpath:" prefix ..
                fileName = fileName.substring("classpath:".length());

                InputStream resource = getClass().getResourceAsStream(fileName);
                if (resource == null) {
                    System.out.println("Couldn't find the file '" + fileName + "' in the classpath.");
                    return;
                }

                // .. and load that file from the classpath.
                content = new InputStreamReader(resource);            
            } else {
                // Load the file from the file system.
                content = new FileReader(fileName);
            }
            
            parser.parse(newKnowledgeBase, content);

            System.out.println("Successfully loaded the file '" + fileName + "'.");
            knowledgeBase = newKnowledgeBase;
        } catch (IOException ex) {
            System.out.println("Couldn't load the file '" + fileName + "' ['"
                    + ex.getMessage() + "', absolute path = '" + new File(fileName).getAbsolutePath() + "')].");
        } catch (ParseException ex) {
            System.out.println("Couldn't parse the file '" + fileName + "' ['" + ex.getMessage() + "'].");
        }
    }