code: public static File getJavaTools() throws MalformedURLException {
          File javaToolsFile = null;
          String javaHome = System.getProperty("java.home");
  
          //if the tools.jar can't be found under the java home, then goto java home's parent and try again.
          //this case would happen when user set the jre as the java home.
          if (null != javaHome && !javaHome.isEmpty()) {
              File javaHomeFile = new File(javaHome);
              javaToolsFile = buildJavaToolsFile(javaHomeFile);
              if (null == javaToolsFile) {
                  javaToolsFile = buildJavaToolsFile(javaHomeFile.getParentFile());
              }
          }
  
          return javaToolsFile;
      }
docs: the file path of the %JAVA_HOME%/lib/tools.jar, which is needed when compiling the generated java source code.
  
  @return
  @throws MalformedURLException
  @throws Exception