title: Gradle build can't find the package 'java.net.http'
body: <p>I have set up a Java project in Intellij. When I build my project within Intellij everything works fine. But when I try to build it from the command line using <code>gradle build</code> in the projects directory, Gradle complains about not finding the java.net.http package.</p>
  
  <p>This is an example if the imports I use in one of my classes:</p>
  
  <pre><code>import com.google.common.base.Joiner;
  import dev.morphia.annotations.Entity;
  import dev.morphia.annotations.Id;
  import dev.morphia.annotations.Reference;
  import java.io.IOException;
  import java.net.URI;
  import java.net.URISyntaxException;
  import java.net.http.HttpClient;
  import java.net.http.HttpRequest;
  import java.net.http.HttpResponse;
  import java.net.http.HttpResponse.BodyHandlers;
  import java.util.ArrayList;
  import java.util.Arrays;
  import java.util.Calendar;
  import java.util.Date;
  import java.util.HashSet;
  import java.util.List;
  import java.util.Set;
  import java.util.logging.Logger;
  import org.apache.commons.math3.stat.descriptive.rank.Median;
  import org.jsoup.Jsoup;
  import org.jsoup.nodes.Document;
  import org.jsoup.nodes.Element;
  import org.jsoup.select.Elements;
  </code></pre>
  
  <p>And this is my build.gradle file:</p>
  
  <pre><code>plugins {
      id 'java'
  }
  
  group 'DatabaseUpdater'
  version '1.0-SNAPSHOT'
  
  sourceCompatibility = 1.8
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      testCompile group: 'junit', name: 'junit', version: '4.12'
      compile 'org.mongodb:mongo-java-driver:2.12.3'
      compile 'dev.morphia.morphia:core:1.5.3'
      compile 'com.google.guava:guava:28.0-jre'
      compile 'org.jsoup:jsoup:1.12.1'
      compile group: 'org.apache.commons', name: 'commons-math3', version: '3.0'
  }
  </code></pre>
  
  <p>I am quite new to Gradle and wondering if I am missing any dependency declaration or so.</p>