src/jdk.jpackage/share/classes/jdk/jpackage/internal/DeployParams.java
branchJDK-8200758-branch
changeset 57450 82c78b40b39d
parent 57438 4a31db8d42bd
child 58114 42df7de58e39
equal deleted inserted replaced
57448:ac7b7fe5f7d8 57450:82c78b40b39d
   110         }
   110         }
   111         resources.add(new RelativeFileSet(
   111         resources.add(new RelativeFileSet(
   112                 baseDir, new LinkedHashSet<>(expandFileset(file))));
   112                 baseDir, new LinkedHashSet<>(expandFileset(file))));
   113     }
   113     }
   114 
   114 
   115     void setClasspath() {
   115     void setClasspath(String mainJarPath) {
   116         String classpath = "";
   116         String classpath;
       
   117         // we want main jar first on the classpath
       
   118         if (mainJarPath != null) {
       
   119             classpath = mainJarPath + File.pathSeparator;
       
   120         } else {
       
   121             classpath = "";
       
   122         }
   117         for (RelativeFileSet resource : resources) {
   123         for (RelativeFileSet resource : resources) {
   118              for (String file : resource.getIncludedFiles()) {
   124              for (String file : resource.getIncludedFiles()) {
   119                  if (file.endsWith(".jar")) {
   125                  if (file.endsWith(".jar")) {
   120                      classpath += file + File.pathSeparator;
   126                      if (!file.equals(mainJarPath)) {
       
   127                          classpath += file + File.pathSeparator;
       
   128                      }
   121                  }
   129                  }
   122              }
   130              }
   123         }
   131         }
   124         addBundleArgument(
   132         addBundleArgument(
   125                 StandardBundlerParam.CLASSPATH.getID(), classpath);
   133                 StandardBundlerParam.CLASSPATH.getID(), classpath);