Questions tagged [property-files]

Files with .properties extension are mainly used in Java related technologies to store the configurable parameters of an application. They can also be used for storing strings for Internationalization and localization; these are known as Property Resource Bundles.

44 questions
1
vote
2 answers

Java: Why does an unclosed stream not throw an exception?

I wanted to write to a property file. But it silently never worked. Just from the code behavior I could not notice it. I always had to open the properties file and look if the value changed. But it never did. So actually I would expect to get an…
Juliette
  • 39
  • 3
1
vote
2 answers

How to read array representation from property file in spring boot

I would like to read a property file which has array format. I have this property file: students.student[0] = ABC students.student[0].marks[0] = 10 students.student[0].marks[1] = 20 students.student[0].marks[2] = 30 students.student[0].marks[3] =…
Techie
  • 759
  • 4
  • 11
  • 29
1
vote
0 answers

Spring Boot - int in property file getting read as String?

In my application.properties file, I have a line that says variablename=1000 I then read it in a class with @Value("${variablename}") private int variablename; Or with @Configuration @ConfigurationProperties public class ClassName This gets me…
adisplayname
  • 117
  • 1
  • 10
1
vote
1 answer

How do I use an external value for JavaScript parameters?

Suppose I've got a bunch of JavaScript files that build funcs something like: me.add ([ panel1: [{ url: 'https://localhost:8888/MyProj-0.0.1/resources/html/dir1/page1.html' }, { url:…
1
vote
1 answer

How do I read a property file present in another package with Resource Bundle?

User file location Property File locationI have a property file in one package named EnotebookCore, but I have to read it in another package named User in one of its java file. When the property file was in one other folder of the same package i.e.…
1
vote
1 answer

Facebook javascript SDK Share version from property files to jsp not working [webapp]

I am using a property file to manage App IDs, and versions. here is the property file : #Facebook APP ID & Version #My Local facebookShareAppId = xxxxxxxxxxx #UAT #facebookShareAppId = xxxxxxxxxxx #QA #facebookShareAppId =…
EdSniper
  • 271
  • 4
  • 21
0
votes
0 answers

Compare more than 2 json file for common properties - Java

I have a list of json property files ( around 20 json property files) Now, need is to find common properties across these json files. I have used guava api json file comparison, it compares 2 json files. Pls suggest any other efficient way to…
NehaGoswami
  • 73
  • 1
  • 9
0
votes
0 answers

Exntended Choice Parameter - does not see property file path from gitlab repository

I have created choice parameted using Extended Choice Parameter property files. When used locally jenkins sees file's path correctly and choices are visible, but when I use deployed version and try to get the property file from git repository it…
0
votes
0 answers

Is it possible to expose property file of java web application to the user and get it updated or deleted

I have property file in my java web application, I want this to be visible to the user, who can edit its values or delete the values as and when he wants, is this possible with property…
tulu matinee
  • 61
  • 1
  • 9
0
votes
1 answer

Encoding issue in property file when the ear is built using Jenkins

My project uses 2 property file based on the locale message.properties and message_de.properties. The German property file contains umlaut. The issue is that when I use Jenkins to deploy the ear in JBoss server, the message_de.properties is not…
user1372469
  • 51
  • 1
  • 1
  • 12
0
votes
0 answers

Not able to display Hindi Fonts in JSP

I am trying to display Hindi fonts on JSP through property file. My property file named as Messages.properties contains following key-value pairs: basic.title = कृषि ऋण basic.menu1 = ये आपके लिए क्यूँ सही हैं basic.menu2 = ब्लॉग basic.menu3 =…
Nishral
  • 25
  • 5
0
votes
1 answer

Jmeter: Not reading the property from the property location given from command line

File: DevEnv.properties # Development Environment property file environment.protocol=https environment.hostname=dev.env.com environment.port=443 environment.path=api File: StagingEnv.properties # Staging Environment property…
Dipak
  • 53
  • 8
0
votes
2 answers

How to read property file to the expected data in selenium

I have created Property file and want to read all the Keys and value and need to compare from the expected data. I have created separate class to read all the data from property file but now i am unable to read data to the main class from where i…
0
votes
1 answer

Produce a JSON structure by reading a property file using SpringBoot

I'm writing a method in SpringBoot which reads the property file and produce JSON through endpoints. My property file looks like this: Category.1=Quality=A,B,C,D Category.2=Program=E,F,G Category.3=Efficiency=H,I,J,K I need to read only the values…
Sudhanva c
  • 109
  • 3
  • 15
0
votes
1 answer

Springboot Unable to access a resource inside a dependent jar's classpath

I have a spring boot JAR MyMain.jar, which has dependent jars inside BOOT-INF/lib. I am trying to access a property file inside the BOOT-INF/lib/MyDep.jar/abcd.properties. I tried the below code. InputStream in = new…