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
0
votes
1 answer

setting Log4j2 Config file path through system variable in IBM Websphere 8.5

I am using IBM Webspehere 8.5, where i need to pass the the log4j2 config file path externally (not hardcoded in deployed jar file as for dev, uat and prod different config file are present) Log4j2 site tells…
Rogger296
  • 147
  • 3
  • 15
0
votes
1 answer

system.properties in AWS

Amazon elastic beanstalk tomcat java web application issue with system.properties. When I use system.getproperty("user.home") to access directory correctly to export a file in my java web application, i can test it fine when i run on localhost.…
0
votes
1 answer

Accessing system properties with Spring 1.x

In Spring 4.x, I always used file:#{systemProperties['user.home']} for accessing a local file and load configuration variables. But, for a very old project, we have to use Spring 1.x (1.2.7), and the same code now doesn't work. I've also tried with…
zankyr
  • 3
  • 1
  • 3
0
votes
0 answers

Java Swift 2 OSX How do I set System Properties and Authenticator?

I can set app specific properties with NSUserDefaults, but not System Properties such as proxxy/port. Her'e how I do it in Java. How can I do this with Swift 2? // Set proxy/port in system properties System.setProperty("http.proxyHost",…
dbconfession
  • 1,147
  • 2
  • 23
  • 36
0
votes
2 answers

Using values of command line arguments in a file other than entrypoint.sh

I have a file named setenv.sh in my tomcat docker container. I use it from my DOCKERFILE like this: COPY setenv.sh /tomcat/bin/setenv.sh In this file, I would like to use some command line arguments that can be passed when I start this docker…
Anthony
  • 33,838
  • 42
  • 169
  • 278
0
votes
1 answer

Passing a system property to an executable

Currently, I am trying to pass a system property to an executable in the following format: ./executable -Dvar="value" other parameters, since this is what I've seen people do for java files. I keep getting an error in the executable saying that…
iHowell
  • 2,263
  • 1
  • 25
  • 49
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
  • 183
  • 2
  • 10
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
  • 9
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,331
  • 6
  • 33
  • 62
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,914
  • 1
  • 22
  • 31