public static File getSettingsDir(String program){
        String userHome = System.getProperty("user.home", ".");
        File work = new File(userHome);
        switch(Meta.getOS()){
            case Meta.OS_LINUX:
                work = new File(userHome, "."+program+"/");break;
            case Meta.OS_WINDOWS:
                String applicationData = System.getenv("APPDATA");
                if (applicationData != null) work = new File(applicationData,"."+program+'/');
                else work = new File(userHome, '.' + program + '/');
                break;
            case Meta.OS_APPLE:
                work = new File(userHome, "Library/Application Support/"+program);break;
            default:
                work = new File(userHome, program + '/');
        }
        System.out.println("Creating settings dir: "+work);
        if((!work.exists())&&(!work.mkdirs()))throw new RuntimeException("Failed to create the setttings dir: "+work);
        return work;
    }