{
  "id": 4200645,
  "title": "JavaDoc WTF 4MB of Fonts JDK 23+",
  "url": "https://urgent.news/2026/08/29/javadoc-wtf-4mb-of-fonts-jdk-23",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-29T13:50:09.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/hrgdavor/javadoc-wtf-4mb-of-fonts-jdk-23-153a"
  },
  "original_language": "en",
  "account": "Java developers utilizing Maven Central to publish packages may have encountered unexpected 8MB usage, seemingly unrelated to their small packages. This phenomenon emerged with JDK 23, as the JDK javadoc tool began embedding default DejaVu web font files (~4 MB) into generated API documentation. To counteract this, the maven-javadoc-plugin offers a solution.\n\nFirstly, plugin configuration enables disabling font inclusion in JDK 23+ builds. Within your pom.xml, set the <configuration> element to include \"additionalOptions\" with the \"--no-fonts\" argument. This configuration effectively neutralizes the unintended inclusion of 4MB font files in your documentation.\n\nAlternatively, the property switch or Maven property provides a direct method to control this behavior without modifying plugin configurations. By using the Maven command \"mvn clean javadoc:javadoc\" followed by the \"-Dmaven.javadoc.disableNoFonts=true\" flag, developers can prevent the inclusion of web fonts in their documentation. However, this approach is viable only if JDK 23 is used; previous versions will reject the unrecognized option, throwing an error.",
  "summary": "I was publishing two small packages to maven central and saw that they added usage tracking. I clicked and noticed 8MB number that should not be caused by 2 tiny packages, it was supposed to be kilobytes. What happened wass that starting in JDK 23, the JDK javadoc tool began embedding default DejaVu web font files (~4 MB) into generated API documentation. The maven-javadoc-plugin passes the JDK's…",
  "key_points": [
    "JDK 23 includes 4MB DejaVu fonts in javadoc, causing unexpected 8MB usage.",
    "Maven plugin solution: add --no-fonts to additionalOptions in pom.xml.",
    "Maven command with -Dmaven.javadoc.disableNoFonts=true prevents font inclusion."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}