title: How to make an executable jar file using IntelliJ from a Selenium/Junit java file?
body: <p>I am trying to generate a jar file of my test to use it in JMeter, I am trying this solution <a href="https://stackoverflow.com/questions/22648384/how-to-make-an-executable-jar-file-using-intellij-from-a-selenium-testng-java-fi">How to make an executable jar file using IntelliJ from a Selenium/TestNG java file?</a> but the problem in on step 4. 
  4- Select your main class using the browse button.
  When I search for class I can't select mine .java code, how I can do the step 4 possible?</p>
  
  <p>My code </p>
  
  <pre><code>public class Jmeter {
      WebDriver driver = null;
  
      @Test
      public void testLoad() {
        //  Robot robot = new Robot();
          ChromeOptions options = new ChromeOptions();
          options.addArguments(Arrays.asList("disable-infobars", "ignore-certificate-errors", "start-maximized","use-fake-ui-for-media-stream"));//
          System.setProperty("webdriver.chrome.driver", "/usr/bin/chromedriver.exe");
          WebDriver driver = new ChromeDriver(options);
          driver.get("myurl");
          my commands
      }
  }
  </code></pre>
  
  <p>Does someone know how to solve this?</p>
  
  <p><strong>Solution</strong> </p>
  
  <p>I created a class with the main method to call my test.</p>
  
  <pre><code>package Jmeter;
  public class JmeterMain {
      public static void main(String[] args) {
          Jmeter test = new Jmeter();
  
          test.testLoad();
  
      }
  }
  </code></pre>