Questions tagged [system-properties]

System properties a key value pairs that can be provided to an application, often used to configure it at run time.

In Java there is a set of predefined properties that specify things like operation system, java version and the current user. A complete list can be found at http://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html

One can also provide arbitrary system properties when executing a java application using the -D commandline parameter like the following example:

java -Dkey=value ClassToExecute

Inside the program the properties can be accessed using System.getProperties() or similar methods in the same class.

260 questions
1
vote
1 answer

System.getProperties returning null for some values

I am having some issues with my tomcat servlet hosted by amazon aws on elasticbeanstalk. In an attempt to secure sensitive data, I am saving it in the web.xml file so that it can be referenced from System.getProperties(). Some of this data, when…
user3080873
  • 65
  • 2
  • 9
1
vote
0 answers

Setting system properties for jar in web application

i want to set system properties for jar in my web application? The default value for key is set in jar using system.properties(),i m trying to pass value for this key from web application. Thanks in advance
AKKI
  • 121
  • 1
  • 4
1
vote
0 answers

Does system properties have size limit?

I am using HP-Unix server. One of system property has a very long string as its value. We notice that the value of the system property gets corrupted. While the other system properties are in-tact. I am wondering, if there is any size limitation for…
Vinod Jayachandran
  • 3,726
  • 8
  • 51
  • 88
1
vote
1 answer

Amazon EMR: Passing java system property to custom jar

Does Amazon EMR allow passing a system property to a custom jar, e.g. hadoop jar -Dkey=value myjob.jar? (key, value above used during initialization of the application itself, rather then belong to hadoop's Configuration object.) The related thread…
Ivan Balashov
  • 1,897
  • 1
  • 23
  • 33
1
vote
3 answers

Initializing program with files passed as main arguments (system.getProperty())

I have to execute my program with this line: java -DImport=data.txt -Din=input.dat -Dout=output1.dat main.Main I've been trying to figure it out how to do this but can't really get it working. I'm using Netbeans since I dont really get along with…
d0pe
  • 573
  • 4
  • 9
  • 23
1
vote
2 answers

Modify TeamCity build parameters programmatically

I created some system properties in TC build configuration. The value of these properties are passed to a maven configuration this way: clean test -Dargument1=%system.property1% -Dargument2=%system.property2% And this works as expected. What I…
1
vote
1 answer

Accessing hadoop config setting without having to pass Configuration object through many layers

In the hadoop project I am working on, I need to access a setting in the hadoop Configuration object. However, I only need this setting many, many layers into the reducer, and I really would rather not pass the Context or Configuration objects…
Quetzalcoatl
  • 3,037
  • 2
  • 18
  • 27
1
vote
3 answers

Maven not passing overriden properties to ant

Currently running into a weird problem with a Maven build that is making a call to ant, within the parent pom the following property is defined: - ${env.JBOSS_HOME} I am trying to override this by passing in -Djboss.home…
Darran L
  • 922
  • 1
  • 8
  • 14
1
vote
0 answers

Problems with execution of JUnit4 TestCases and TestSuite

Possible Duplicate: @parameters method is executed before @beforeclass method I am facing some trouble with JUnit 4 TestsUites and Parameterized Tests. In my Suite I want to set a SystemProperty like…
kirschmichel
  • 903
  • 1
  • 8
  • 14
1
vote
1 answer

Java System.getProperty("line.separator") not working in apache server

My method System.getProperty("line.separator") is not working in Apache server but seems to work in local Eclipse. Actual implementation str2=str1.replace(System.getProperty("line.separator"), "CH(50)"); The code works in eclipse but not in server…
1
vote
0 answers

auto-deploy .war to remote jboss4.2.3.GA fail using hudson deploy plugin

I'm using hudson-deploy plugin, to auto-deploy my .war file to a remote jboss4.2.3.GA. When I set the port lower than 10000, it works, for example: http://10.78.68.210:8080/ But our system is using port 17200, so the url should be…
michael
  • 149
  • 1
  • 13
1
vote
1 answer

Maven exec with multiple system properties

I'm trying to run mvn exec with multiple system properties...it works ok with one but not with two for some reason. e.g. This works fine mvn -Dlocation=c:\tmp exec:java -Dexec.mainClass="MyClass" This doesn't work mvn -Dlocation=c:\tmp …
DD.
  • 21,498
  • 52
  • 157
  • 246
0
votes
1 answer

Java: Where does Maven store system properties set in the pom.xml within a compiled jar?

We've specified a bunch of system properties in our maven compiler plugin definition within pom.xml: org.apache.maven.plugins
KomodoDave
  • 7,239
  • 10
  • 60
  • 92
0
votes
4 answers

Creating a directory within another directory in user.home?

I was just wondering if the code I made will work to create multiple directories within each other. I used this as a reference. String username = enterUserTF.getText(); //the username the user enters in a textfield. boolean…
Amundeep Singh
  • 194
  • 5
  • 16
0
votes
1 answer

Set JVM flags in an Apache Giraph job

I am running an Apache Giraph job which ultimately runs a Hadoop MapReduce job. The job is run by calling a hadoop jar lib/giraph_2.12.jar org.apache.giraph.GiraphRunner command I'm trying to set a few JVM flags/System properties using the -ca flag…