@@ -106,12 +106,12 @@ protected File doApply(Packager packager) throws Exception {
106106
107107 Logger .info ("Creating customized JRE ..." );
108108
109- // tests if specified JDK is for the same platform than target platform
109+ // tests if specified JDK is for the same platform as target platform
110110 if (!JDKUtils .isValidJDK (platform , jdkPath )) {
111111 throw new Exception ("Invalid JDK for platform '" + platform + "': " + jdkPath );
112112 }
113113
114- String modules = getRequiredModules (libsFolder , customizedJre , jarFile , requiredModules , additionalModules , additionalModulePaths );
114+ String modules = getRequiredModules (packager , libsFolder , customizedJre , jarFile , requiredModules , additionalModules , additionalModulePaths );
115115
116116 Logger .info ("Creating JRE with next modules included: " + modules );
117117
@@ -182,11 +182,11 @@ protected File doApply(Packager packager) throws Exception {
182182 * @return string containing a comma separated list with all needed modules
183183 * @throws Exception Process failed
184184 */
185- protected String getRequiredModules (File libsFolder , boolean customizedJre , File jarFile , List <String > defaultModules , List <String > additionalModules , List <File > additionalModulePaths ) throws Exception {
185+ protected String getRequiredModules (Packager packager , File libsFolder , boolean customizedJre , File jarFile , List <String > defaultModules , List <String > additionalModules , List <File > additionalModulePaths ) throws Exception {
186186
187187 Logger .infoIndent ("Getting required modules ... " );
188188
189- File jdeps = new File (System . getProperty ( "java.home" ), "/bin/jdeps" );
189+ File jdeps = new File (packager . getPackagingJdk ( ), "/bin/jdeps" );
190190
191191 File jarLibs = null ;
192192 if (libsFolder != null && libsFolder .exists ())
0 commit comments