Package java.util

Examples of java.util.Properties.load()


  }

  public static void removeFromPluginBeanProps(File beanPropsFile) throws Exception {
    Properties tempP = new Properties();

    tempP.load(new FileInputStream(beanPropsFile));
    if (BEAN_PLUGINS_PROPERTIES.contains(tempP)) {
      BEAN_PLUGINS_PROPERTIES.remove(tempP);
    }
  }
View Full Code Here


        Properties props = new Properties();

        InputStream is = new FileInputStream( prop_file );

        try{
          props.load( is );

          Iterator it = props.entrySet().iterator();

          while( it.hasNext()){
View Full Code Here

    AdminModule.connect("root", "root", 60);

    // Create a topic forwarding its messages to the configured email address.
    Properties prop = new Properties();
    prop.load(new FileInputStream("smtp.properties"));
    prop.put("distribution.className", "com.scalagent.joram.mom.dest.mail.MailDistribution");
    Topic topic = Topic.create(0, null, Destination.DISTRIBUTION_TOPIC, prop);

    // Create a queue getting its messages from the configured email address.
    prop = new Properties();
View Full Code Here

    prop.put("distribution.className", "com.scalagent.joram.mom.dest.mail.MailDistribution");
    Topic topic = Topic.create(0, null, Destination.DISTRIBUTION_TOPIC, prop);

    // Create a queue getting its messages from the configured email address.
    prop = new Properties();
    prop.load(new FileInputStream("pop.properties"));
    prop.put("acquisition.className", "com.scalagent.joram.mom.dest.mail.MailAcquisition");
    Queue queue = Queue.create(0, null, Destination.ACQUISITION_QUEUE, prop);

    javax.jms.ConnectionFactory cf = TcpConnectionFactory.create("localhost", 16010);
View Full Code Here

            /* Hibernate properties */
            __logger.info( "...loading: hibernate.properties" );

            InputStream in = getClass(  ).getClassLoader(  ).getResourceAsStream( "hibernate.properties" );
            Properties  props = new Properties(  );
            props.load( in );

            /* Session Factory */
            __logger.info( "...initializing the Hibernate SessionFactory" );

            SessionFactory sessionFactory = ds.buildSessionFactory( props );
View Full Code Here

    synchronized (configInfo)
    {
      if (configInfo.length() == 0) {
        Properties templates = new Properties();
        try {
          templates.load(JSONHttpMetadataPublisher.class
              .getResourceAsStream("codec.properties"));
          String propertyTemplate = templates
          .getProperty("template.config.property","<html><body>My Bad...Undefined template</body></html>");
          StringBuffer propertys = new StringBuffer();
View Full Code Here

    if(!endPointDocuments.containsKey(this.codec.getEndpoint().getPortName())){
      WSEndpoint<?>     endPoint   = codec.getEndpoint();
      JAXBContextImpl   context   = (JAXBContextImpl)endPoint.getSEIModel().getJAXBContext();
      Properties      templates   = new Properties();
      try {
        templates.load(JSONHttpMetadataPublisher.class.getResourceAsStream("codec.properties"));
      } catch (IOException e) {
        return;
      }
      String templateMain = templates.getProperty("template.default.main",
          "<html><body>My Bad... Undefined template</body></html>");
View Full Code Here

        Properties properties = new Properties();
        String file = fileDialog.open();

        if (file != null) {
            try {
                properties.load(new FileInputStream(file));
                for (String key : _headerFileMap.keySet()) {
                    HeaderHandler handler = _headerFileMap.get(key);
                    String headerText = properties.getProperty(handler.getName());
                    handler.setSpecificHeader(_selectedProject, headerText);
                    _headerTabTextMap.get(key).setText(headerText);
View Full Code Here

  private static Properties parseArguments(String agentArgument,
      String separator) {
    Properties p = new Properties();
    try {
      String argumentAsLines = agentArgument.replaceAll(separator, "\n");
      p.load(new ByteArrayInputStream(argumentAsLines.getBytes()));
    } catch (IOException e) {
      String s = "Could not load arguments as properties";
      throw new RuntimeException(s, e);
    }
    return p;
View Full Code Here

   
   
          in = ConfigPropertyLoader.class.getResourceAsStream("/" + filename);
          if (in != null) {
            Properties lprops = new Properties();
            lprops.load(in);
            props.putAll(lprops);
           
          }
          else {
            throw new TransactionRuntimeException("Failed to load properties from file '"+filename+ "' configuration file");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.