Add java8-to-25 module: legacy Java 8 app run on JDK 8, 17 and 25, tool coverage, JVM flags, libraries, OpenRewrite and the fixed version
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b6vDJ5fWY5uEZaJFNi
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/** Which javax.* packages does this JDK still contain, and which Java EE ones are gone? */
|
||||
public class JavaxMap {
|
||||
public static void main(String[] args) {
|
||||
List<String> inJdk = new ArrayList<>();
|
||||
ModuleLayer.boot().modules().forEach(m -> m.getPackages().stream()
|
||||
.filter(p -> p.startsWith("javax.") && m.getDescriptor().exports().stream()
|
||||
.anyMatch(e -> e.source().equals(p) && !e.isQualified()))
|
||||
.forEach(inJdk::add));
|
||||
System.out.println("exported javax.* packages in this JDK: " + inJdk.size());
|
||||
for (String p : new String[] {"javax.sql", "javax.crypto", "javax.net.ssl", "javax.naming",
|
||||
"javax.management", "javax.script", "javax.swing", "javax.xml.parsers", "javax.transaction.xa",
|
||||
"javax.annotation.processing", "javax.xml.bind", "javax.xml.ws", "javax.jws", "javax.activation",
|
||||
"javax.annotation", "javax.transaction", "javax.servlet", "javax.persistence", "javax.validation"}) {
|
||||
System.out.printf(" %-28s %s%n", p, inJdk.contains(p) ? "in the JDK, keep javax" : "not in the JDK");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user