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.

239 questions
0
votes
1 answer

How to Access Websphere Custom Properties with j2e app?

We have an application running on websphere 8.5 and we'd like to pull the value of a custom property created using the following method in websphere admin console: Servers->Application Servers->server1->Process Definition->Java Virtual…
h8MyJob
  • 133
  • 1
  • 9
0
votes
1 answer

HTTPS Web service call, that works on localhost, fails on test environment with exception: javax.net.ssl.SSLException: SSLSocketFactory is null

We are accesing SOAP web service via HTTPS. We have multiple environments set up, for development, testing, user acceptence, production. The main problem is, that our SSL web service call on the developement environment is working, but when we…
Bozidar
  • 1
  • 1
0
votes
1 answer

Selenium test can be started via maven only. Fails with NullPointer when starting using TestNG xml file (because system variable is 'null')

The issue is the following - if I launch my autotests via maven(from command prompt OR eclipse), then they run without issues. If I try to launch via testng.xml(from eclipse), then my tests fail with NullPointerException. Basically here is my…
0
votes
1 answer

Does WAS Liberty support and

I just recently installed WAS Liberty 8.5.5.7 as I am doing a conversion to Liberty for a projected presently deployed and configured for a GlassFish 4 environment. The glassfish project, has a number of and configured within its domain …
Sergio
  • 95
  • 7
0
votes
3 answers

Use of System properties and what is use of System properties

I have seen code : public static final boolean SUPRESS_CHECK = "true".equals(System.getProperty("sdp.authz.disable", "false")); what kind of use of this properties ? why we have to use system properties setting and getting ? when we should…
0
votes
1 answer

Wildfly 8.2/Undertow - properties placeholder does not seem to work for alias attribute in host configuration

I'm trying to generalize Wildfly (8.2 Final) XML configuration in order to have a single configuration XML file with references of system properties (${what.ever.value.key.from.proerties}) in order to distinguish dev. and prod. env. by different…
Korvin
  • 35
  • 1
  • 7
0
votes
1 answer

Exception does not catching in try..catch(Exception ex)

Testing presence of videeditor_jni Native Library in system libraries by static { try { if (System.getProperty("videoeditor_jni") != null) { System.loadLibrary("videoeditor_jni"); } else { …
0
votes
2 answers

Configure Log4J2 with a System property to use a URL

Log4j2 accepts: -Dlog4j.configurationFile=path/to/log4j2.xml @see https://logging.apache.org/log4j/2.0/faq.html But we used to be able to use a real URL like http://host/configuration.xml. Is there a way to achieve this or has it been removed…
benji
  • 2,026
  • 5
  • 25
  • 51
0
votes
0 answers

java System.setProperty not affecting anti-aliasing; command line option works

I'm trying to make a java Swing program default to anti-aliasing when run on Linux. It works when I pass the settings as command line options or using _JAVA_OPTIONS, but not using System.setProperty(). I'm using Java SE 6 on Centos 5.5 via VNC with…
Jeff Learman
  • 2,506
  • 1
  • 18
  • 28
0
votes
1 answer

SystemProperties.set not working

I have following code in my Source code to set SystemProperties. SystemProperties.set("ro.csc.countryiso_code","KoreaA"); String country1 = SystemProperties.get("ro.csc.countryiso_code"); Log.e("DebugA",country1); …
Nikhil Kumar
  • 2,098
  • 3
  • 17
  • 24
0
votes
1 answer

using SystemProperties to get Serial (Brand, Device.. etc) on Android

I develop Android app to show some basic info. Looking at sources, I discovered that android.os.Build has most of needed values /** The name of the overall product. */ public static final String PRODUCT = getString("ro.product.name"); to take a…
Paul Verest
  • 51,779
  • 39
  • 174
  • 288
0
votes
0 answers

Pass values into spring from maven install -Denv=value, deploy on Tomcat

I have a maven project that uses spring and I would like to insert a filename into Spring whose contents has various database information. The filename can either be test.properties, prod.properties or dev.properties. I have seen posted that one can…
John
  • 123
  • 1
  • 10
0
votes
0 answers

How to see Windows's "default" colors in the properties window when using the designer?

It's a "quality of life" question, because there is no bug or anything, but it really annoys me. You can see in Visual Studio, when you're editing your XAML properties, that for a given control, you can select "default" colors for Background and…
Kilazur
  • 2,828
  • 1
  • 21
  • 43
0
votes
1 answer

os.name system property value in Java for Windows Server 2008

Does anyone know the value of the Java system property "os.name" on Windows Server 2008? I found a rally going here (Crowdsourcing a Complete list of Common Java System Properties and Known Values), but nothing on Windows Server 2008. Any help is…
Brian
  • 1
  • 2
0
votes
1 answer

Log4j crashes with NullPointerException when log4j.configurationFile system property exists

I'm quite new to the Log4j2, so may be it isn't a bug just I don't know how to use it properly. I would like to configure the Log4j2 via configuration file specified by the log4j.configurationFile system property. In my previous experiments I was…
mTUX
  • 51
  • 5
1 2 3
15
16