def properties_to_dict(filepath):
    """
    Convert Java .properties file to a dict

    Only include non-commented lines
    """
    out = {}
    with open(filepath) as prop_file:
        for line in prop_file.readlines():
            line = line.strip()
            if line and (not line.startswith('#')):
                k, v = line.split('=')
                out[k.strip()] = v.strip()
    return out