Questions tagged [properties-file]

A .properties file is either a simple text file or an XML file containing pairs of keys and values. Java and related technologies frequently use .properties files to store configuration information.

Properties files can also be used to store Strings for Internationalization and Localization and error messages.

and related technologies frequently use properties files.

Further Reading:

1316 questions
-2
votes
3 answers

Reversing a properties file content

I've a properties file (say exmp.properties) which is something like this 1. k5=500 2. k4=400 3. k3=300 4. k2=200 5. k1=100 I need to reverse the content of this file like 1. k1=100 2. k2=200 3. k3=300 4. k4=400 5. k5=500 Is there any way I can…
Sharath
  • 3
  • 3
-2
votes
1 answer

Reading usernames and passwords for several accounts from .properties file

I am having the following problem. I have a configuration.properties file that I would like to read inside my application. It is of the following form: accountNames = account1, account2, account3 account1.userName = testUserName account1.password =…
MihaiD
  • 63
  • 1
  • 10
-2
votes
2 answers

How can i override part of an existing class in a new class?

I would like to use the following code from this question in order to sort Properties alphabetically: Properties tmp = new Properties() { @Override public synchronized Enumeration keys() { return Collections.enumeration(new…
Drifter64
  • 1,103
  • 3
  • 11
  • 30
-3
votes
3 answers

Python get multiline value from properties file

I have properties file with multilines and some of the values on more than 1 line. Something like this: first.key=\ Right,\ Side,\ Value second.key=Second value third.key=Third value I want to take the value for each key. I…
user17881376
-3
votes
2 answers

What is this Exception i got and Help me out?

package jdbc.examples; import java.io.FileInputStream; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; import java.util.Properties; public class PropertiesDemo { private static…
-3
votes
1 answer

How to read & write in a properties file with javascript

I'm working in a JEE web project and i have a problem, i would like to read and write into a properties file which is located into WebContent/WEB-INF/classes folder and i need to do this with javascript, do you have an idea how to do that ?
-3
votes
1 answer

Java | manually change a value in the properties file

So I have a .properties file in java. One of the properties hold the value for a certain path which happened to change. What I did is edit the .properties file to change the value to the new path. However it seems that I am always reading the old…
Abdelrahman Shoman
  • 2,882
  • 7
  • 36
  • 61
-4
votes
2 answers

properties.getProperty(key) method returns null value

I am load the properties file and get the value from that file but when i using "Properties" class and getProperty(key) method, it was return null value. code: public class LoadPropertiesFile { public static String getProperty (String key, String…
kannan arumugam
  • 41
  • 1
  • 2
  • 7
-5
votes
1 answer

property file to json, Java code

// My property file : key1 = value1 key2 = value2,value3 key3 = value4, value5, value6 Requirement in json "Arguments": { "key1":"value1", "key2":["value2","value3"] "key3":["value4","value5","value6"] } …
Ramesh
  • 1
  • 1
-5
votes
2 answers

java.io.FileNotFoundException: /app.properties: open failed: EROFS (Read-only file system)

I would like to create file of format .properties in android app. Unfortunately, I am getting error java.io.FileNotFoundException: /app.properties: open failed: EROFS (Read-only file system) Any idea why?
user3415458
  • 765
  • 1
  • 6
  • 5
1 2 3
87
88