public static void loadProperties ( String classpathName , Properties toProps ) { Validate . argumentIsNotNull ( classpathName ) ; Validate . argumentIsNotNull ( toProps ) ; InputStream inputStream = PropertiesUtil . class . getClassLoader ( ) . getResourceAsStream ( classpathName ) ; if ( inputStream == null ) { throw new JaversException ( CLASSPATH_RESOURCE_NOT_FOUND , classpathName ) ; } try { toProps . load ( inputStream ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } }
loads a properties file from classpath using default classloader