How to change the maximum size of a file

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Viewer MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-viewer -- dnx GroupDocs.Viewer.Mcp --yes
Folders, licensing and more →

On this page

Due to the numerous resources and .class files in the JAR file, the MANIFEST.MF file has become huge. For instance, it is approximately 19.7 Mb for GroupDocs.Viewer v21.2 and 22.5 Mb for GroupDocs.Viewer v23.7.

That is why you may get errors similar to the one below:

error: error reading /home/jenkins/.gradle/caches/modules-2/files-2.1/com.groupdocs/groupdocs-viewer/21.2/541f695e50f5ed475786402ce0be5978db3a8bb2/groupdocs-viewer-21.2.jar; Unsupported size: 19732345 for JarEntry META-INF/MANIFEST.MF. Allowed max size: 8000000 bytes

The issue arises from Java’s file size limit, which is set at 8,000,000 bytes by default. You can resolve this using the -Djdk.jar.maxSignatureFileSize=8000000 option in your Virtual Machine settings. Change the 8,000,000 to the required file size limit.

SET MAVEN_OPTS="-Djdk.jar.maxSignatureFileSize=25000000"
mvn clean compile spring-boot:run
export MAVEN_OPTS="-Djdk.jar.maxSignatureFileSize=25000000"
mvn clean compile spring-boot:run
Note
If needed, use the JAVA_OPTS or JAVA_TOOL_OPTIONS instead of MAVEN_OPTS.

On this page