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
3 answers

Can you observe system property changes in Android?

Is there a mechanism for observing changes in system properties from your own app in Android SDK? For example, I want to be able to detect changes in the system.adb.tcp.port property.
szx
  • 6,433
  • 6
  • 46
  • 67
1
vote
1 answer

Trying to solve "More than the maximum number of request parameters (GET plus POST) for a single request" from application context

I’m using Spring 3.2.11.RELEASE with JBoss 7.1.3.Final. I’m building a WAR file and I have a page that submits a form with more than 512 parameters. Upon doing so, I get the below exception … 20:05:03,905 ERROR…
Dave
  • 15,639
  • 133
  • 442
  • 830
1
vote
2 answers

How can I make XPathFactory newInstance fail in Java?

Documentation for XPathFactory.newInstance(String uri) is here. I am trying to make this fail like this: println(System.getProperty("DEFAULT_PROPERTY_NAME")); System.setProperty("DEFAULT_PROPERTY_NAME",…
Koray Tugay
  • 22,894
  • 45
  • 188
  • 319
1
vote
1 answer

How does the Dsun.java2d.trace work

I have seen this already. I am trying to understand how does Dsun.java2d.trace works when applied to a system or application. When does these flags get set? The link says on less-than-desirable performance,can we have an example or the charecter of…
RBz
  • 896
  • 3
  • 17
  • 34
1
vote
1 answer

Maven3 system.property user.home vs environment variable HOME

There seems to be a problem with the system properties in Maven. It seems that system properties don't correspond to the environment variables. The situation is that I would like to the change the absolute location of the user-specific settings.xml…
Gab是好人
  • 1,976
  • 1
  • 25
  • 39
1
vote
1 answer

use system properties proxy settings for camel http4

I'm trying to use the System Properties' proxy settings for the http4 component to no avail. The documentation gives this example:
Sebastian Saip
  • 452
  • 2
  • 5
  • 17
1
vote
1 answer

How can I pop up the system property window in windows7

I want to open the system property window to change environment variable in Windows7. I know how to open that window, and used to use that window sometimes before, but today I opened the window as usual, It does not appear. How can I open it?
1
vote
0 answers

Cannot use System.getProperty

I am trying to use System.getProperty("foo"), to read some variables in eclipse. Two ways I have tried Specify in the run configuration in environment tab Specicy with -D in eclipse.ini file I am using windows machine, could anybody help me with…
1
vote
1 answer

Determining the OS dynamically

I'm using the following piece of code for a Web Application String OS=System.getProperty("os.name").toLowerCase(); if(OS.contains("win")) { request.getRequestDispatcher("/result.jsp").forward(request, response);…
1
vote
0 answers

Update all components after System.setProperty("awt.useSystemAAFontSettings", "on"); was changed to "off"

Is it possible to update for example all JTextField components in existing application to show rendered text (or not rendered) while setting and later changing system properties? All JTextField components are initiated just once. System properties…
Ernestas Gruodis
  • 8,567
  • 14
  • 55
  • 117
1
vote
1 answer

Adding system property in testng XML?

We are trying to add a system property directly in the testng xml file, as we want to automatically run different test suites in a Jenkins job, without having different xml files for each test set. Is there a way to pass a system property directly…
pboix
  • 23
  • 1
  • 3
1
vote
1 answer

How to ignore expired certificates from outside a Java application?

We have a Java application that we need to ignore an expired self-signed cert, however we cannot modify the code to do this. I wondering if there was a System Property or environment variable that we could provide at start up that would allow us to…
Rodney S. Foley
  • 10,190
  • 12
  • 48
  • 66
1
vote
1 answer

Defining System Properties in Spring Boot Plugin

I would like to specify some system properties in my applicatio (deterined at compile time). I am using the spring boot maven plugin to compile Currently, according to this questions: Specify system property to Maven project I tried the following…
mangusbrother
  • 3,988
  • 11
  • 51
  • 103
1
vote
1 answer

Create a file with Windows Property Store (metadata) using win32 API

I'd like to create a new stub file "test.mp3" for instance, and add a Window Property to it ( System.Author for instance). the solution must be usable for several file extension as text, picture, videos, etc... If I just create a file and use…
Carlos_rpg
  • 71
  • 1
  • 12
1
vote
1 answer

System.getProperty("user.home") returns /root when running on Tomcat

I am developing my application in Ubuntu. I have one Java web Spring MVC application. In that I have a controller. The client can upload a file (posting through AngularJS). In the controller, I am getting the file and copying to a specific…
Coder
  • 6,948
  • 13
  • 56
  • 86