All Questions
Tagged with system-properties command-line
8 questions
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 ...
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 ...
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....
8
votes
0
answers
2k
views
How do you set -DargLine system property inside MAVEN_OPTS environment variable?
I'm using maven and have a list of system properties -DA=alpha, -DB=beta -DS=random_stuff that I want to pass down to unit tests when maven runs, and which cannot go into the pom files.
Surefire and ...
5
votes
2
answers
12k
views
Java setting system property using command line
While reading java man page, I found the -Dproperty=value flag which stats that by passing this flag, it will create a system property with value = value.
I wrote a test java code:
class File{
...
0
votes
1
answer
655
views
Why does -Dproperty=value not work if -jar is specified first?
Given the following class:
public class SpecifySystemPropertiesCommandLine {
public static void main(String[] args) {
String prop1 = System.getProperty("prop1", "defaultvalue");
...
1
vote
2
answers
5k
views
Obtaining the "user.dir" system property for a java process from the command line
I am trying to read the system property "user.dir" from the command line for a particular java process. I have seen several examples of obtaining the system property from Java code (System.getProperty)...
83
votes
5
answers
220k
views
Set multiple system properties Java command line
Is there an easier way to specify multiple System Properties on the command line to a Java program rather than having multiple -D statements?
Trying to avoid this:
java -jar -DNAME="myName" -...