← ClaudeAtlas

java-migratelisted

Interactive Java version upgrade guide (8 to 11, 11 to 17, 17 to 21). Use when user asks to "migrate to Java 17", "upgrade to Java 21", "Java migration guide", "move from Java 11 to 17", or "what changed in Java 21".
limited-grisaille833/claude-java-plugins · ★ 0 · Code & Development · score 59
Install: claude install-skill limited-grisaille833/claude-java-plugins
Guide the migration of a Java project to a newer Java version. This is an interactive migration assistant. ## Step 1 — Detect current version Check `pom.xml` (`<java.version>`, `<maven.compiler.source>`, `<maven.compiler.target>`) or `build.gradle` (`sourceCompatibility`, `javaVersion`). Ask for target version if not specified. ## Step 2 — Build the migration checklist ### Java 8 → Java 11 **Breaking changes to fix:** - Remove `sun.*` and `com.sun.*` internal API usage → find public alternatives - Remove JavaEE modules now removed from JDK: `javax.xml.bind` (JAXB), `javax.activation`, `javax.annotation` → add as Maven dependencies (`jakarta.xml.bind-api`, etc.) - Fix `ClassLoader.getSystemClassLoader().getResourceAsStream()` → use `getClass().getResourceAsStream()` - Flag use of `finalize()` → deprecated, suggest `Cleaner` or try-with-resources **Quick wins to adopt (optional):** - `var` for local variables (Java 10+) where type is obvious - `List.of()`, `Map.of()`, `Set.of()` instead of `Collections.unmodifiableList(Arrays.asList(...))` - `String` new methods: `isBlank()`, `strip()`, `lines()`, `repeat()` - `Optional.ifPresentOrElse()`, `Optional.or()` **Build changes:** ```xml <maven.compiler.source>11</maven.compiler.source> <maven.compiler.target>11</maven.compiler.target> ``` ### Java 11 → Java 17 **Breaking changes to fix:** - Strong encapsulation of JDK internals — fix any `--add-opens` flags (may need library updates) - Remove deprecated `SecurityManager` usage