public void initFromSystemProperties() throws Exception {

        classNamesAsTable = new Properties();
        try {
            InputStream in = Factory.class.getResourceAsStream("comm.properties");
            classNamesAsTable.load(in);
            in.close();
        } catch (IOException e) {
            System.out.println("couldn't read or load the properties file.");
        }

        for (Map.Entry<Object, Object> objectEntry : classNamesAsTable.entrySet()) {

            String mathOperator = (String) objectEntry.getKey();
            String className = (String) objectEntry.getValue();

            Class cls = Class.forName(className);
            Constructor constructor = cls.getConstructor();
            Command obj = (Command) constructor.newInstance();

            // looking for annotations:
            Field[] fields = cls.getDeclaredFields();
            if (fields != null) {
                for (Field field : fields) {

                    if (field.isAnnotationPresent(CResource.class)) {
                        CResource annotation = field.getAnnotation(CResource.class);
                        Type annoType = annotation.type();

                        switch (annoType) {
                            case STACK:
                                field.setAccessible(true);
                                field.set(obj, stack);
                                break;
                            case DEFINE:
                                field.setAccessible(true);
                                field.set(obj, defines);
                                break;
                            default:
                                throw new RuntimeException("Unexpected anno: " + annoType);
                        }
                    }
                }
            }

            classesMap.put(mathOperator, obj);
        }
    }