private static boolean isBundledInJre ( String className ) { if ( className . startsWith ( "javax.accessibility." ) || className . startsWith ( "javax.activation." ) || className . startsWith ( "javax.activity." ) || className . startsWith ( "javax.annotation." ) || className . startsWith ( "javax.crypto." ) || className . startsWith ( "javax.imageio." ) || className . startsWith ( "javax.jws." ) || className . startsWith ( "javax.lang.model." ) || className . startsWith ( "javax.management." ) || className . startsWith ( "javax.naming." ) || className . startsWith ( "javax.net." ) || className . startsWith ( "javax.print." ) || className . startsWith ( "javax.rmi." ) || className . startsWith ( "javax.script." ) || className . startsWith ( "javax.security." ) || className . startsWith ( "javax.sound." ) || className . startsWith ( "javax.sql." ) || className . startsWith ( "javax.swing." ) || className . startsWith ( "javax.tools." ) || className . startsWith ( "javax.transaction." ) || className . startsWith ( "javax.xml." ) ) { return true ; } return false ; }
javax packages are tricky . Some are in the JRE . Some aren t .