Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #4914

Properties file ?

From The Nigga <fernandopaivabr@gmail.com>
Newsgroups comp.lang.java.gui
Subject Properties file ?
Date 2012-01-10 13:36 -0800
Organization http://groups.google.com
Message-ID <657850d3-2af5-4c99-9677-e18b3ad91bf6@q8g2000yqa.googlegroups.com> (permalink)

Show all headers | View raw


I am trying create a properties file and save in a package of my
project, I can read but I can not save. The package name is
"properties".

I am trying this.


Properties p = new Properties();
//reading, work.
p.load(getClass().getClassLoader().getResourceAsStream("properties/
file.properties"));
System.out.println(p.getProperty("myKey"));

//saving, not work
p.store(getClass().getClassLoader().getResourceAsStream("properties/
file.properties"),"Config File");

How to save my file.properties in package "properties" ?

thanks.

Back to comp.lang.java.gui | Previous | NextNext in thread | Find similar


Thread

Properties file ? The Nigga <fernandopaivabr@gmail.com> - 2012-01-10 13:36 -0800
  Re: Properties file ? Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-01-10 17:13 -0800
    Re: Properties file ? The Nigga <fernandopaivabr@gmail.com> - 2012-01-10 18:09 -0800
      Re: Properties file ? "John B. Matthews" <nospam@nospam.invalid> - 2012-01-10 21:24 -0500
        Re: Properties file ? The Nigga <fernandopaivabr@gmail.com> - 2012-01-10 19:31 -0800
          Re: Properties file ? The Nigga <fernandopaivabr@gmail.com> - 2012-01-11 02:08 -0800
          Re: Properties file ? "John B. Matthews" <nospam@nospam.invalid> - 2012-01-11 08:13 -0500

csiph-web