# Protect ODP Presentation Files using Java

> Protect ODP presentations in Java. Use Aspose.Slides for Java to encrypt presentation files and set write protection.

Source: https://products.aspose.com/slides/java/protect/odp/
Updated: 2026-07-09



## Protecting an ODP Presentation via Java

Using [Aspose.Slides for Java](/slides/java/), you can protect an ODP presentation from opening or modification by setting a password. Use the `ProtectionManager` object from the `Presentation` class to call methods such as `encrypt` and `setWriteProtection`.

### Encrypt an ODP Presentation using Java

```java
Presentation presentation = new Presentation("presentation.odp");
try {
    presentation.getProtectionManager().encrypt("123123");
    presentation.save("encrypted-presentation.odp", SaveFormat.Odp);
} finally {
    presentation.dispose();
}
```

### Set Write Protection for an ODP Presentation using Java

```java
Presentation presentation = new Presentation("presentation.odp");
try {
    presentation.getProtectionManager().setWriteProtection("123123");
    presentation.save("write-protected-presentation.odp", SaveFormat.Odp);
} finally {
    presentation.dispose();
}
```

## How to Password Protect ODP via Java

These are the steps to protect ODP files.

Load the `ODP` file with the `Presentation` class.

Call the `encrypt` method or the `setWriteProtection` method from the `ProtectionManager` object.

Save the protected presentation in ODP format.

## Other Supported Protect Formats
