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
0
votes
6 answers

Java: Can not load a properties file. Why?

I am trying to load a properties file. I have the properties file in the same directory as the class that I am trying to load it. Example: package com.classes.internal; public class ClassA { private static String PFILE =…
Jim
  • 18,826
  • 34
  • 135
  • 254
-1
votes
1 answer

Update .properties or .yml file

Requirement: I have to update .properties or .yml file. Which is in parent module. I have created spring boot custom library to get values from parent .properties or .yml and communicate to third service to get Json data. That contain password. This…
Rajesh Sharma
  • 59
  • 1
  • 11
-1
votes
2 answers

How to export dictionary as a .property file in python

How can a dictionary in python be exported to .properties file type in python? What I have: dict = {"key1":"sentence1", "key2":"sentence2"} The object dict should be saved as .properties file in python, the output should look like…
pikachu
  • 690
  • 1
  • 6
  • 17
-1
votes
2 answers

Property substitution in password.properties not working

I'm working on a springboot application which has security.xml used by AuthFilter[Org level authentication filter]. This xml looks in passwords.properties for username, password, etc. Sharing sample ex below. security.xml…
-1
votes
1 answer

How to define "static" class to read feedback messages in Flask application?

We are implementing a Flask application. We shall have json file for feedback messages - with key - value pairs( The keys will be some constants, and the values will be actual messages, and then during the runtime the actual messages will be read…
Ivajlo Iliev
  • 303
  • 1
  • 3
  • 19
-1
votes
3 answers

Using int value from properties Spring Boot

I haven't seen such question anywhere, so I'm going to ask here about it. I have to make few instances of one object type, the number of how many instances I must instance should be provided from the file .properties. I tried using annotations…
Tadeusz M
  • 1
  • 1
  • 1
-1
votes
1 answer

OpenGL set up problem when create new project via Visual Studio express 2017?

I'm using VisualStudio express 2017 as the IDE. I have set up everything for the OpenGL and everything works fine. But there is a problem, I realized that I have to set up the library and dependencies every time when I create a new project. Can…
Allen Li
  • 479
  • 1
  • 5
  • 11
-1
votes
1 answer

Properties fileNotFoundException in spring batch

i have a properties file names config.properties in path: src/main/resources/config.properties, but when i try to launch the job i get Caused by: java.io.FileNotFoundException: class path resource [config.properties] cannot be opened because it does…
-1
votes
3 answers

NullPointerException while reading a properties file in selenium

I have below code: public class BasePage { public static WebDriver driver; public static Properties prop; FileInputStream objfile; @Test public void BasePages() throws IOException { try { prop = new…
-1
votes
1 answer

How to read from a properties files using Spring

I'd like to use Spring to read from a properties file retrieving a URL, a username, and a password. I've read many examples online and they all more or less look the same but I simply don't understand them. One said example shows two similar methods…
WeVie
  • 568
  • 2
  • 9
  • 25
-1
votes
3 answers

what kind of file should i use in android to reference information that i stored?

I have created an android app that calculates the numerical values of word, and gives you a list of other words with the same numerical value. The way I have been doing it, is storring the words and value in a .properties file. Ie. A line from a…
Ephraim
  • 8,352
  • 9
  • 31
  • 48
-1
votes
1 answer

jasper reports - msg function not accepting more than 4 parameters including pattern

So it seems i can't create a string from properties file with more than 3 parameters plus the pattern: msg(str("lifeletter."+$P{COD_DOC}+".message"),$P{PR_YEAR},$P{MODULE_NAME},$F{benefit_value},$F{accumulated_value}) I get this error: The method…
Maxrunner
  • 1,955
  • 4
  • 24
  • 41
-1
votes
1 answer

Pyspark 2.4 Issue faced while passing properties file in spark submit

I have a pyspark program which connects to MySQL db successfully and reads a table. Now, I am trying to pass the database credentials from a properties file, instead of embedding them in the code, but not able to make it work. from pyspark.sql…
-1
votes
1 answer

Android .properties file with variable holding different values based on the current build variant

I have a .property file which at the moment is like this: com.myapp.token = myGenericString What I would like to have is to have different values for different build variants. Something like: if (BuildConfig == Release) { com.myapp.token =…
ace_ventura
  • 468
  • 1
  • 4
  • 14
-1
votes
3 answers

how to read from property file in spring boot

I am able to read (value of 'fruits') from property file in my spring boot application, successfully using @Value as below. @Value("${fruits}") private String[] fruitarray; from the…
dzoneuser
  • 63
  • 1
  • 7