changeset 6422:c896cd34e781

RT-29286: javafxpackager: -makeall option doesn't work at all Summary: source was locked to Java 5, and the passed in classpath was ignored for compilation
author shemnon
date Tue, 04 Mar 2014 10:56:16 -0700
parents b8a1db3d5a8b
children df8841896a28
files modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/PackagerLib.java
diffstat 1 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/PackagerLib.java	Tue Mar 04 09:53:18 2014 -0800
+++ b/modules/fxpackager/src/main/java/com/sun/javafx/tools/packager/PackagerLib.java	Tue Mar 04 10:56:16 2014 -0700
@@ -734,26 +734,28 @@
             } finally {
                 sources.close();
             }
+            String classpath = jfxHome + "/../rt/lib/ext/jfxrt.jar";
+            if (makeAllParams.classpath != null) {
+                classpath += File.pathSeparator + makeAllParams.classpath;
+            }
             if (makeAllParams.verbose) {
                 System.out.println("Executing javac:");
-                System.out.format("%s %s %s %s %s %s %s %s %s %s\n",
+                System.out.printf("%s %s %s %s %s %s%n",
                         javac.getAbsolutePath(),
-                        "-target", "1.5",
-                        "-source", "1.5",
                         "-d", compiledDirName,
-                        "-cp", jfxHome + "/../rt/lib/ext/jfxrt.jar",
+                        "-cp", classpath,
                         "@" + tmpFile.getAbsolutePath());
             }
             int ret = execute(
                     javac.getAbsolutePath(),
-                    "-target", "1.5",
-                    "-source", "1.5",
                     "-d", compiledDirName,
-                    "-cp", jfxHome + "/../rt/lib/ext/jfxrt.jar",
+                    "-cp", classpath,
                     "@" + tmpFile.getAbsolutePath());
             if (ret != 0) {
                 throw new PackagerException("ERR_JavacFailed", Integer.toString(ret));
             }
+        } catch (PackagerException e) {
+            throw e;
         } catch (Exception e) {
             throw new PackagerException(e, "ERR_MakeAllJavacFailed");
         }