private String [ ] buildJrePackages ( final int javaVersionNumber ) { final ArrayList < String > packages = new ArrayList <> ( ) ; switch ( javaVersionNumber ) { case 9 : case 8 : case 7 : case 6 : case 5 : // in Java1.5, the apache stuff moved packages . add ( "com.sun.org.apache" ) ; // fall through... case 4 : if ( javaVersionNumber == 4 ) { packages . add ( "org.apache.crimson" ) ; packages . add ( "org.apache.xalan" ) ; packages . add ( "org.apache.xml" ) ; packages . add ( "org.apache.xpath" ) ; } packages . add ( "org.ietf.jgss" ) ; packages . add ( "org.w3c.dom" ) ; packages . add ( "org.xml.sax" ) ; // fall through... case 3 : packages . add ( "org.omg" ) ; packages . add ( "com.sun.corba" ) ; packages . add ( "com.sun.jndi" ) ; packages . add ( "com.sun.media" ) ; packages . add ( "com.sun.naming" ) ; packages . add ( "com.sun.org.omg" ) ; packages . add ( "com.sun.rmi" ) ; packages . add ( "sunw.io" ) ; packages . add ( "sunw.util" ) ; // fall through... case 2 : packages . add ( "com.sun.java" ) ; packages . add ( "com.sun.image" ) ; // fall through... case 1 : default : // core stuff packages . add ( "sun" ) ; packages . add ( "java" ) ; packages . add ( "javax" ) ; break ; } return packages . toArray ( new String [ 0 ] ) ; }
Builds a set of java core packages .