Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
28 views

Can I call System.setProperty in Selenium Java then read it in the main app?

I need to set a flag in a java web app if it's running under a Selenium Java test. The Selenium test code starts with: System.setProperty("testRunning", "true"); Then selenium ...
timmacp's user avatar
  • 193
0 votes
1 answer
31 views

In Spring Framework tests, how to make PropertySourcesPlaceholderConfigurer search System Properties first?

I am not using Spring Boot. I have a plain Spring Framework application. I have a Spring integration test written with SpringJUnitConfig. I am using PropertySourcesPlaceholderConfigurer. By default ...
Harold L. Brown's user avatar
0 votes
0 answers
34 views

wildfly elytron setting the system property from encryption:create-expression fails WFLYCTL0097 Expected [EXPRESSION, STRING] but was OBJECT

I am using wildfly-33.0.0.Final and trying to set the encrypted value of a parameter through a cli script. Basically I am trying to do the following: /system-property=aaa:add(value=`/subsystem=...
Philip W's user avatar
0 votes
1 answer
101 views

java.version returning surprising value

I am trying to test legacy code under a different JRE than that which it was written for. Running under Mac OS Monterey, 12.7.1. Let's call them JRE_old and JRE_new. To be certain which one my code ...
skiaddict1's user avatar
0 votes
1 answer
57 views

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 ...
Utkarsh Roy's user avatar
2 votes
1 answer
169 views

Gradle Integration Tests are failing because the value of a System.getProperty('zap.port') is null

These are my ext program variables: ext { skipIntegrationTests = 'false' skipUnitTests = 'false' localEnv = 'false' xmakeEnv = 'false' encoding = 'UTF-8' integrationEnvDir = '...
Deev Pal's user avatar
0 votes
0 answers
170 views

could @@SERVERNAME be redefined to return an alias

A vendor application has a routine that does some validation by using @@Servername in SQL. This returns the name of the instance but I would prefer it returned the name of the Alias (SQL defined) for ...
Paul Wichtendahl's user avatar
0 votes
1 answer
35 views

How to update java project properties with gradle commandline

I'm working on a java project and currently loading properties by: properties.load(ConfigProperty.class.getClassLoader().getResourceAsStream("project.properties")); But sometimes I also ...
leblanc's user avatar
  • 15
0 votes
1 answer
135 views

How to set a default value to a string using System Poperties?

I'm trying to use Java system properties to take values from Command line as follows in my build.xml file - <target name="endPoint depends="standard-release"> <java ...
jjl's user avatar
  • 15
0 votes
1 answer
99 views

How to get windows domain name in gradle taks?

I am to switch between DB localhost or a dev server DB depending on the system I am running the code. in the build.gradle System.getenv() System.getProperty("test.property") but this one ...
sachyy's user avatar
  • 612
1 vote
1 answer
970 views

Define environment variable for app in Tomcat, outside of deployment

I need to provide a config file path to my Java web application that runs in Apache Tomcat 10.1. The config path must be set outside of the deployment. It's a property of the machine / stage on which ...
MrSnrub's user avatar
  • 1,173
0 votes
1 answer
457 views

No value for 'org.quartz.scheduler.instanceId'

I have a problem with an application war, the application was not made by me, the application works, but when import to eclipse and export with attaching tomcat and java libraries 1.8.0_321, it does ...
martuo's user avatar
  • 3
1 vote
0 answers
974 views

Setting dynamic password from Maven

We've started using an AWS CodeArtifact Maven repository. Before connecting, developers must run a command ("aws") to acquire a temporary access token. How can I configure Maven to acquire ...
Steve Mitchell's user avatar
0 votes
1 answer
169 views

What happens when I declare a custom system property in java?

Wondering what happens when I declare a custom property in java using -D command. I came to know that other system properties are not stored, instead generated by JVM. So what will happen to the ...
Kartik Hegde's user avatar
1 vote
2 answers
97 views

Java Home not set

I downloaded gradle and in the instruction it told me to add it to system variables so i did but i accidentally removed one of the paths. So when i tried to see what version of gradle i use it was ...
itmemilan's user avatar
  • 361
0 votes
1 answer
275 views

Run a jar file out of java programm with many system properties

I want to start a .jar File out of my java program using the Process Builder like this: ProcessBuilder pb = new ProcessBuilder("java", "-Xdebug", "-DpropKey1=value", &...
aslanj's user avatar
  • 69
1 vote
1 answer
764 views

Why need extra step by using http.proxyHost for apache camel http component

By using http.proxyHost for apache camel http component . It need two steps below, otherwise http.proxy will not work for camel http component. put -Dhttp.proxyHost at java command line at camel ...
stewchicken's user avatar
1 vote
1 answer
830 views

Exception in thread "main" java.lang.Error: Unresolved compilation problems: Syntax error on token "Invalid Character" executing Selenium Java program

Code trials: package split; public class locators { public static void main(String[] args) { // TODO Auto-generated method stub System.setProperty(“webdriver.chrome.driver”, “C/...
Sundar Jakob's user avatar
3 votes
1 answer
1k views

Clear/unset a system property maven.compiler.release so that is is no longer present

I have a project with complicated build setup (parent POM's with parent POM's) and so it happens that my compiler plugin executes with maven.compiler.release=8. This prevents me from setting source/...
alamar's user avatar
  • 19.3k
3 votes
0 answers
3k views

Enabling the Log4j 1.x bridge

How to set the system property “log4j1.compatibility” to a value of “true” and How to set the Log4j 1 system property “log4j.configuration” to the location of the log4j 1 configuration file. I have ...
jmonroe's user avatar
  • 61
0 votes
0 answers
40 views

How to pass system properites in comand line to scala 3 executable

With scala 2 it was possible to pass system properties in the command line using -D<propname>=<propvalue> like in the following example: $scala -Dpath.to.folder=/opt/myfolder Scala v3 ...
Alessandro Caproni's user avatar
0 votes
2 answers
3k views

Quarkus unit-testing and properties

I have a basic question about Quarkus testing, I would like to execute the command ./mvnw clean test but I need to use a token to init the application. I have configured application-test.properties ...
Rodrigo Prestes Machado's user avatar
0 votes
1 answer
432 views

How to perform system property operations in WildFly via REST?

This documentation states that one can perform certain operations for a WildFly server via REST: https://docs.jboss.org/author/display/WFLY10/The%20HTTP%20management%20API.html However, there is no ...
Baradé's user avatar
  • 1,332
3 votes
0 answers
121 views

How to access JBOSS system properties from JAVASCRIPT framework code?

Is it possible to point environmental variables from JavaScript(e.g react, vue, angular) during build time to JBOSS System-Properties and can be access during runtime? Heres my sample code: const ...
Mclain Arandia Cabais's user avatar
0 votes
2 answers
565 views

How to append value to a system property using command line

When setting property value via command line, the whole value will be replaced. Example: $ java -XshowSettings:properties ... Property settings: <...snip...> java.library.path = /usr/java/...
Anthony's user avatar
  • 2,040
1 vote
1 answer
106 views

How to access "user.home" with Java on a Raspberry Pi and write to it?

I have some issues creating files on a Raspberry Pi. The same code runs on Windows without any problems... Surprisingly System.getProperty("user.home"); returns just /. System.getProperty(&...
Japhei's user avatar
  • 625
1 vote
1 answer
182 views

How to know if a computer has multiple monitors connected to it?

My system monitoring app takes screenshot every five minutes it runs in a system. But for a system connected in dual monitor mode needs a different set of codes to take the complete 180 degree ...
Ananthu K Kumar's user avatar
0 votes
0 answers
689 views

Using System.getProperty("user.dir") to get location of project when hosted on AWS, but getting NoSuchFileException

This is working correctly locally, but not when hosting on AWS. I've been attempting to debug this for a week and can't seem to crack it. Here is the code block that I believe is causing my issue. In ...
Cory Bergquist's user avatar
3 votes
2 answers
6k views

How to ensure that java system property `user.timezone` is explicitly specified?

I want to be sure that my Java program is always run by explicitly specified user.timezone property. I pass -Duser.timezone=XXX as a command-line setting. However, when I omit that system property at ...
Suren Aznauryan's user avatar
1 vote
0 answers
259 views

com/ibm/xml/xlxp2/api/wssec/WSSXMLStreamReader cause out of memory issue

Good day, 2 years ago, my application hit OOME issue, I analyze the heap dump and found that its cause by com/ibm/xml/xlxp2/api/wssec/WSSXMLStreamReader, I tried to google around and found this IBM ...
Panadol Chong's user avatar
0 votes
1 answer
131 views

Manually opened Excel / Notepad file (Opened by user), How would like to identify this through java program

Description : Actually I am looking the java code which is basically running in the background, But whenever I want to open a new notepad or excel file , It will capture those file as an input and ...
Raghuvir Prasad's user avatar
2 votes
1 answer
103 views

Undocumented Hotspot OpenJDK System properties

I've recently discovered some undocumented system properties in the JDK's System.Logger API, in particular, jdk.logger.finder.singleton. I couldn't find any web pages which mention this system ...
A248's user avatar
  • 794
0 votes
0 answers
181 views

how to Use system properties to pass parameters to the runner/maven build

I want to run my test in three different preset resolution: 768x1024, 360x740, 1920x1024 using the existing framework. And I have to use system properties to pass parameters to the runner/maven build. ...
bouka boukandi's user avatar
0 votes
1 answer
166 views

How to invoke a maven profile multiple times with different system properties

I have around 15 maven profiles which are identical except that they have different systemPropertyVariables in their configuration. I would like to execute them all with a single command, and I know I ...
Sagol Goru's user avatar
1 vote
0 answers
51 views

Is there a way to configure 2 property system in same @Value ins spring boot?

I trying to use 2 different property files with the same parameters which every parameter is describing the same property for example: NewsPaperConsumer.properties, MarketConsumer.properties when ...
Lupidon's user avatar
  • 609
4 votes
1 answer
4k views

How does gradle decide the file.encoding JVM system property?

When compiling, running tests, or running a main class, gradle launches java with an explicit file.encoding, for example: /usr/bin/java -Dfile.encoding=ISO-8859-1 -Duser.country=GB -Duser.language=en ...
hertzsprung's user avatar
  • 9,863
0 votes
0 answers
386 views

Feed JAVA_OPTS with multiple parameters [duplicate]

How do I feed a program with multiple parameters as JAVA_OPTS? When I use something like this: JAVA_OPTS="Dx=x1,-Dy=y1" The value that results for x is "x1,-Dy=y1" and the string ...
AHH's user avatar
  • 1,073
0 votes
1 answer
2k views

Environment variables not converted to system properties

Working on a legacy Spring based application (Spring 4.3), I have a strange behavior: environment variables are not resolved by Spring. For example I have this environment variable: ...
akuma8's user avatar
  • 4,641
0 votes
2 answers
1k views

why do we set system properties in our java code?

In java, we set system properties with System.SetProperties(Key, Value). I have the following queries related to it. On what occasion we set the system properties in our code? How do we determine the ...
MrNolan's user avatar
  • 154
4 votes
1 answer
2k views

Setting the "mail.imaps.fetchsize" property to a large number using JavaMail have any impacts?

I have a schedule job to fetch recent emails from a folder and write those emails into a file (.eml file). But it was taking a long time (5 to 6 minutes to read an email of size 9mb) to finish. Since ...
user3742125's user avatar
0 votes
1 answer
933 views

System.getProperty() showing null

How so I get the default value of system property in java like ntlm.debug or jdk.tls.stapling. ignoreExtensions On using system.getProperty(Property name) gives null. I am running with jdk version 11....
nzare's user avatar
  • 23
4 votes
4 answers
4k views

Can I get the path of the currently running java executable?

Suppose I want to run a java program from the command line and I use this command: myExes\java\java.exe AJavaProgram As you can see, java.exe is not in my path, so I am running it manually rather ...
Alexander Porter's user avatar
1 vote
0 answers
198 views

initialize default system property in java

Is there a smart way to initialize default system properties in java? There are some properties which make sense to define each time, e.g. a service port, serverUrl. But then there are some ...
flavio.donze's user avatar
  • 8,040
5 votes
2 answers
380 views

Why do classes in javax.mail store system properties in static fields? [closed]

I've ran into a problem handling file names in javax.mail and some of those aspects need to be configured by session properties and some by system properties. Many classes of javax.mail seem to store ...
Thorsten Schöning's user avatar
4 votes
1 answer
8k views

64-Bit Server VM Warning: Options -Xverify:none and -noverify were deprecated in JDK 13. Safe to delete -Xverify:none from Environment Variables?

The following message appears when I run any program. Picked up _JAVA_OPTIONS: -Xverify:none Java HotSpot(TM) 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 ...
Suede's user avatar
  • 438
2 votes
1 answer
757 views

How to initiate multiple versions of Geckodriver through System.setProperty()

I don't know if I'm overseeing something, but is it possible to use multiple geckodriver versions in the same JVM? The problem is with System.setProperty("webdriver.gecko.driver", "path of the ...
Christof's user avatar
1 vote
4 answers
6k views

how to inject a property at maven build time that is accessible later at runtime in a java project?

I'm trying to inject a property into a java project when it is built by maven, by injecting the property via the command line, like mvn clean install -DMYPROP=myProperty I thought this was ...
user26270's user avatar
  • 7,074
3 votes
2 answers
8k views

(Keycloak) Freemarker Template system properties and environment variables

We wanted to work on the Templates and tried to get the system properties that we set earlier in the standalone.xml file like this. </extensions> <system-properties> <property name=...
Arved's user avatar
  • 31
1 vote
1 answer
607 views

gradle.properties not taking values from command line

I have gradle.properties file for which I am passing value from command line as below command but not taking the value. gradle test -DsystemProp.RunnerApplication=QAEnv -Dgroups=CSP-Smoke My build....
Sobhit Sharma's user avatar
2 votes
1 answer
3k views

properties-maven-plugin does not set System propertey correctly

I am trying to set a system property in my java project with the maven plugin properties-maven-plugin. Here is my maven code: <build> <plugins> <plugin> ...
Andwari's user avatar
  • 181

1
2 3 4 5 6