title: Setting CucumberOptions "features" dynamically from within in Java
body: <p>I'm trying to create a portable testing suite with Cucumber and Selenium in Java. From my main method I'm doing something like this: </p>
  
  <pre><code> JPanel panel = new JPanel();    
      // adding panel to frame
      frame.add(panel, BorderLayout.CENTER);
      /* calling user defined method for adding components
       * to the panel.
       */
      placeComponents(panel);
      //Set the size of the window
  
      //Set the frame to appear in the center of the screen. 
      Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
      frame.setLocation(dim.width/2-frame.getSize().width/2, dim.height/2-frame.getSize().height/2);
  
      // Setting the frame visibility to true
      frame.setVisible(true);
  
      System.out.println("Gonna Try to launch the test");
      RunCukeTests.main(args);
  </code></pre>
  
  <p>I've got a simple config class (which I plan on adding more functions to)</p>
  
  <pre><code>public class FeatureConfig {
  
  private static String filePath = "";
  
  
  public static String getFilePath() {
      return filePath;
  }
  
  }
  </code></pre>
  
  <p>And my TestRunner class looks like this: </p>
  
  <pre><code>@RunWith(Cucumber.class)
  //@Feature("my/package/**/*.feature")
  @CucumberOptions(
  
    //features= {"src/test/java/multiTest"}
    features= {FeatureConfig.getFilePath() }
  , glue={"stepDefs"}
  , monochrome = true
  , plugin = {"pretty"}
  )
  
  public class RunCukeTests {
      public static void main(String[] args) throws Exception {    
          System.out.println("This is a test");
          JUnitCore junit = new JUnitCore();
          Result result = junit.run(windowGui.RunCukeTests.class); 
      }
  }
  </code></pre>
  
  <p>The issue I'm running into is in the line </p>
  
  <pre><code>features= {FeatureConfig.getFilePath() }
  </code></pre>
  
  <p>Which is giving me the error </p>
  
  <pre><code>The value for annotation attribute CucumberOPtions.feature must be a constant expression 
  </code></pre>
  
  <p>Does this means I cannot set the features path dynamically without using the command line or is there a way to achieve this? </p>