Fl�vio 

Ao inv�z de vc usar ini, porque vc n�o usa um arquivo do tipo
Properties

Ai vai um exemplo:

Acesso:

      String ProFileName = "hmg.properties";
      Properties p = new Properties();

      try {
        p.load((InputStream)getClass().getResourceAsStream(ProFileName));
      } catch (Exception e) {
        System.err.println("Can't read the properties file. " +
        "Make sure hmg.properties is in the CLASSPATH");
      }


      this.UserID = p.getProperty("UserID","");
      this.Password = p.getProperty("Password","");
      this.Server = p.getProperty("Server","");
      this.Port = p.getProperty("Port","");
      this.Instance = p.getProperty("Instance","");


Arquivo : xxx.properties

UserID=xxx
Password=zzz
Server=10.10.10.101
Port=1521
Instance=xyz


Obs. O Arquivo dever� estar em um diretorio citado no ClassPath


[EMAIL PROTECTED],Internet writes:
>Alguem manja como ler um arquivo INI?
>Ou tem alguma classe pronta que fa�a isso?
>
>Fl�vio H.S. Leite
>Analista de Sistemas
>Desenvolvimento
>
>GFMI Software
>Criando o futuro!
>
>- "Levante todos aqueles que estiverem ca�dos ao seu redor, voc� n�o sabe
>onde seus p�s trope�ar�o" - Anonimo
>
>
>




------------------------------ LISTA SOUJAVA ---------------------------- 
http://www.soujava.org.br  -  Sociedade de Usu�rios Java da Sucesu-SP 
d�vidas mais comuns: http://www.soujava.org.br/faq.htm
regras da lista: http://www.soujava.org.br/regras.htm
para sair da lista: envie email para [EMAIL PROTECTED] 
-------------------------------------------------------------------------

Responder a