Question: I'm trying to read my META-INF/MANIFEST.MF file from my Spring Boot web app (contained in a jar file).

I'm trying the following code:

```
        InputStream is = getClass().getResourceAsStream("/META-INF/MANIFEST.MF");

        Properties prop = new Properties();
        prop.load( is );

```

But apparently there is something behind the scenes in Spring Boot that a different manifest.mf is loaded (and not my own located in META-INF folder).

Does anyone know how I can read my manifest app in my Spring Boot app?

**UPDATE:** After some research I noticed that using the usual way to read a manifest.mf file, in a Spring Boot application this is the Jar that is being accessed

```
org.springframework.boot.loader.jar.JarFile

```

Answer: 
It's simple just add this

```
    InputStream is = this.getClass().getClassLoader().getResourceAsStream("META-INF/MANIFEST.MF");

    Properties prop = new Properties();
    try {
        prop.load( is );
    } catch (IOException ex) {
        Logger.getLogger(IndexController.class.getName()).log(Level.SEVERE, null, ex);
    }

```

Working for me.

Note: 

> 
> getClass().getClassLoader() is important
> 
> 
> 

and 

> 
> "META-INF/MANIFEST.MF" not "/META-INF/MANIFEST.MF"
> 
> 
> 

Thanks
Aleksandar
```
public Properties readManifest() throws IOException {
    Object inputStream = this.getClass().getProtectionDomain().getCodeSource().getLocation().getContent();
    JarInputStream jarInputStream = new JarInputStream((InputStream) inputStream);
    Manifest manifest = jarInputStream.getManifest();
    Attributes attributes = manifest.getMainAttributes();
    Properties properties = new Properties();
    properties.putAll(attributes);
    return properties;
}

```