class CommandLineProcessor extends OptionProcessor {

    private final Option openOption = Option.defaultArguments();
    private final Option openOption2 = Option.additionalArguments('o', "open");
    private final String MEMORY_ERROR;

    public CommandLineProcessor() {
        MEMORY_ERROR = NbBundle.getMessage(CommandLineProcessor.class, "CommandLineProcessor.OutOfMemoryError.message");
    }

    @Override
    protected Set<Option> getOptions() {
        HashSet<Option> set = new HashSet<>();
        set.add(openOption);
        set.add(openOption2);
        return set;
    }

    @Override
    public void process(Env env, Map values) {<FILL_FUNCTION_BODY>}
}

        WindowManager.getDefault().invokeWhenUIReady(() -> new Thread(() -> {
            List<String> filenameList = new ArrayList<>();
            Object obj = values.get(openOption);
            if (obj != null) {
                filenameList.addAll(Arrays.asList((String[]) obj));
            }
            obj = values.get(openOption2);
            if (obj != null) {
                filenameList.addAll(Arrays.asList((String[]) obj));
            }
            Logger.getLogger(CommandLineProcessor.class.getName())
                .info("Handling " + filenameList.size() + " files from command line");
            try {
                for (int i = 0; i < filenameList.size(); i++) {
                    File file = new File(filenameList.get(i));
                    if (!file.isAbsolute()) {
                        file = new File(env.getCurrentDirectory(), filenameList.get(i));
                    }
                    if (!file.exists()) {
                        NotifyDescriptor.Message msg = new NotifyDescriptor.Message(NbBundle
                            .getMessage(CommandLineProcessor.class, "CommandLineProcessor.fileNotFound",
                                file.getName()),
                            NotifyDescriptor.WARNING_MESSAGE);
                        DialogDisplayer.getDefault().notifyLater(msg);
                        return;
                    }
                    Actions.forID("File", "org.gephi.desktop.project.actions.OpenFile").actionPerformed(
                        new ActionEvent(file, 0, null));
                }
            } catch (OutOfMemoryError ex) {
                System.gc();
                NotifyDescriptor nd = new NotifyDescriptor.Message(MEMORY_ERROR, NotifyDescriptor.ERROR_MESSAGE);
                DialogDisplayer.getDefault().notifyLater(nd);
            } catch (Exception ex) {
                Exceptions.printStackTrace(ex);
                NotifyDescriptor nd =
                    new NotifyDescriptor.Message("CommandLineParsing " + ex.getMessage(),
                        NotifyDescriptor.ERROR_MESSAGE);
                DialogDisplayer.getDefault().notifyLater(nd);
            }
        }, "CommandLineProcessor").start());
    
<no_super_class>