facebook

Can launch configs supply arguments based on properties?

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #270177 Reply

    I have a .properties file that contains various values that configure the build process. In some cases I’d like to use property values as program arguments in a launch configuration. Is that possible?

    For example, my properties file contains the following line:
    serverHome=byers.com

    Then I have a launch configuration, and in the program arguments would like to include something like:
    home=${serverHome}

    And have that be equivalent to using:
    home=byers.com

    #270206 Reply

    Loyal Water
    Member

    You can pass System Properties in the VM arguments section in the Run Configuration and then call System.getProperty in your java code e.g If your system includes the SERVERHOME environment variable which needs to be passed, then its would be passed as -DDSQUERY=$SERVERHOME. This needs to be added to the VM arguments list under the Arguments tab when you run your code. Make sure the environment variable your are passing exists. Also make sure your syntax is correct.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Can launch configs supply arguments based on properties?

You must be logged in to post in the forum log in