Get list of system properties from command line onlyHow to get an enum value from a string value in Java?Setting Java system properties without putting the values on the command lineSet multiple system properties Java command lineObtaining the “user.dir” system property for a java process from the command lineHow to avoid Java system properties on command line?How do I run a Java program from the command line on Windows?Problems passing system properties and parameters when running Java class via GradleReading Java system properties from command lineCan command-line set Java system properties be distinguished from the defaults?Command line parameters in Java

Are actors contractually obligated to certain things like going nude/ Sensual Scenes/ Gory Scenes?

What was the deeper meaning of Hermione wanting the cloak?

How should I avoid someone patenting technology in my paper/poster?

Can planetary bodies have a second axis of rotation?

Is the sentence "何でも忘れた" correct?

What do solvers like Gurobi and CPLEX do when they run into hard instances of MIP

Do household ovens ventilate heat to the outdoors?

Can one guy with a duplicator initiate a nuclear apocalypse?

Cheap antenna for new HF HAM

Why there so many pitch control surfaces on the Piaggio P180 Avanti?

Pseudo Game of Cups in Python

How is underwater propagation of sound possible?

How to influence manager to not schedule team meetings during lunch?

Is it possible that the shadow of The Moon is a single dot during solar eclipse?

GitHub repo with Apache License version 2 in package.json, but no full license copy nor comment headers

Escape the labyrinth!

As an employer, can I compel my employees to vote?

Linear independence of element-wise powers of positive vectors

Is there any reason nowadays to use a neon indicator lamp instead of an LED?

How would a native speaker correct themselves when they misspeak?

What do these pins mean? Where should I plug them in?

Microservices and Stored Procedures

Are there hydrocarbons on the Moon?

Could someone please show me the steps of this sum?



Get list of system properties from command line only


How to get an enum value from a string value in Java?Setting Java system properties without putting the values on the command lineSet multiple system properties Java command lineObtaining the “user.dir” system property for a java process from the command lineHow to avoid Java system properties on command line?How do I run a Java program from the command line on Windows?Problems passing system properties and parameters when running Java class via GradleReading Java system properties from command lineCan command-line set Java system properties be distinguished from the defaults?Command line parameters in Java






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















This is similar to a pretty basic question, I'm trying to find a list of system properties passed to the java program from the command line only. E.g., running



java -Dsome.property=value -Dother.property=value2


I'm trying to get a list of JUST these properties. Ignore the specific property names in the example, the actual command line arguments will be arbitrarily named so it is not feasible to explicitly call System.getProperty("some.property") for each property I need.



System.getProperties() returns many properties that I do not have any interest in. Is it possible to differentiate between properties set on the command line when starting the program vs those that come from elsewhere?










share|improve this question
































    1















    This is similar to a pretty basic question, I'm trying to find a list of system properties passed to the java program from the command line only. E.g., running



    java -Dsome.property=value -Dother.property=value2


    I'm trying to get a list of JUST these properties. Ignore the specific property names in the example, the actual command line arguments will be arbitrarily named so it is not feasible to explicitly call System.getProperty("some.property") for each property I need.



    System.getProperties() returns many properties that I do not have any interest in. Is it possible to differentiate between properties set on the command line when starting the program vs those that come from elsewhere?










    share|improve this question




























      1












      1








      1








      This is similar to a pretty basic question, I'm trying to find a list of system properties passed to the java program from the command line only. E.g., running



      java -Dsome.property=value -Dother.property=value2


      I'm trying to get a list of JUST these properties. Ignore the specific property names in the example, the actual command line arguments will be arbitrarily named so it is not feasible to explicitly call System.getProperty("some.property") for each property I need.



      System.getProperties() returns many properties that I do not have any interest in. Is it possible to differentiate between properties set on the command line when starting the program vs those that come from elsewhere?










      share|improve this question
















      This is similar to a pretty basic question, I'm trying to find a list of system properties passed to the java program from the command line only. E.g., running



      java -Dsome.property=value -Dother.property=value2


      I'm trying to get a list of JUST these properties. Ignore the specific property names in the example, the actual command line arguments will be arbitrarily named so it is not feasible to explicitly call System.getProperty("some.property") for each property I need.



      System.getProperties() returns many properties that I do not have any interest in. Is it possible to differentiate between properties set on the command line when starting the program vs those that come from elsewhere?







      java grails groovy






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 28 at 17:01









      Daniel

      2,3011 gold badge7 silver badges25 bronze badges




      2,3011 gold badge7 silver badges25 bronze badges










      asked Mar 28 at 14:51









      TreblaTrebla

      6741 gold badge6 silver badges22 bronze badges




      6741 gold badge6 silver badges22 bronze badges

























          1 Answer
          1






          active

          oldest

          votes


















          3

















          Is it possible to differentiate between properties set on the command
          line when starting the program vs those that come from elsewhere?




          As far as I know, this is not supported. By the time your code is executing, the command line system properties have already been munged with all of the others.



          Depending on what you are really trying to accomplish, one thing to consider might be to not set them as command line system properties but instead pass them as parameters to your program so you can evaluate them and then set them as system properties in your main method before much of your other code executes.



          I hope that helps.






          share|improve this answer

























          • It does. I did work around it as you suggest, but was still curious if it was possible. Good to know it's not.

            – Trebla
            Mar 28 at 18:41










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );














          draft saved

          draft discarded
















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55400584%2fget-list-of-system-properties-from-command-line-only%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          3

















          Is it possible to differentiate between properties set on the command
          line when starting the program vs those that come from elsewhere?




          As far as I know, this is not supported. By the time your code is executing, the command line system properties have already been munged with all of the others.



          Depending on what you are really trying to accomplish, one thing to consider might be to not set them as command line system properties but instead pass them as parameters to your program so you can evaluate them and then set them as system properties in your main method before much of your other code executes.



          I hope that helps.






          share|improve this answer

























          • It does. I did work around it as you suggest, but was still curious if it was possible. Good to know it's not.

            – Trebla
            Mar 28 at 18:41















          3

















          Is it possible to differentiate between properties set on the command
          line when starting the program vs those that come from elsewhere?




          As far as I know, this is not supported. By the time your code is executing, the command line system properties have already been munged with all of the others.



          Depending on what you are really trying to accomplish, one thing to consider might be to not set them as command line system properties but instead pass them as parameters to your program so you can evaluate them and then set them as system properties in your main method before much of your other code executes.



          I hope that helps.






          share|improve this answer

























          • It does. I did work around it as you suggest, but was still curious if it was possible. Good to know it's not.

            – Trebla
            Mar 28 at 18:41













          3














          3










          3










          Is it possible to differentiate between properties set on the command
          line when starting the program vs those that come from elsewhere?




          As far as I know, this is not supported. By the time your code is executing, the command line system properties have already been munged with all of the others.



          Depending on what you are really trying to accomplish, one thing to consider might be to not set them as command line system properties but instead pass them as parameters to your program so you can evaluate them and then set them as system properties in your main method before much of your other code executes.



          I hope that helps.






          share|improve this answer














          Is it possible to differentiate between properties set on the command
          line when starting the program vs those that come from elsewhere?




          As far as I know, this is not supported. By the time your code is executing, the command line system properties have already been munged with all of the others.



          Depending on what you are really trying to accomplish, one thing to consider might be to not set them as command line system properties but instead pass them as parameters to your program so you can evaluate them and then set them as system properties in your main method before much of your other code executes.



          I hope that helps.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 28 at 15:49









          Jeff Scott BrownJeff Scott Brown

          16.9k1 gold badge19 silver badges33 bronze badges




          16.9k1 gold badge19 silver badges33 bronze badges















          • It does. I did work around it as you suggest, but was still curious if it was possible. Good to know it's not.

            – Trebla
            Mar 28 at 18:41

















          • It does. I did work around it as you suggest, but was still curious if it was possible. Good to know it's not.

            – Trebla
            Mar 28 at 18:41
















          It does. I did work around it as you suggest, but was still curious if it was possible. Good to know it's not.

          – Trebla
          Mar 28 at 18:41





          It does. I did work around it as you suggest, but was still curious if it was possible. Good to know it's not.

          – Trebla
          Mar 28 at 18:41








          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.




















          draft saved

          draft discarded















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55400584%2fget-list-of-system-properties-from-command-line-only%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현