dynamic_link tests: fix ilib_build_jar.tst 85/18885/1
Clément DAVID [Mon, 16 Jan 2017 15:03:11 +0000 (16:03 +0100)]
Change-Id: Iac0d24e623c95c55c3d1fa404fdc683e74ed9167

scilab/modules/external_objects_java/src/java/org/scilab/modules/external_objects_java/ScilabJavaCompiler.java

index d8707ad..d81768b 100644 (file)
@@ -30,10 +30,12 @@ import java.net.URLClassLoader;
 import java.net.URL;
 import java.util.Arrays;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 import java.util.Locale;
 import java.util.ServiceLoader;
 import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.swing.SwingUtilities;
 import javax.tools.Diagnostic;
@@ -185,6 +187,12 @@ public class ScilabJavaCompiler {
         String[] compileOptions = new String[] {"-d", BINPATH};
         Iterable<String> options = Arrays.asList(compileOptions);
 
+        try {
+            stdFileManager.setLocation(StandardLocation.CLASS_OUTPUT, Collections.singleton(new File(BINPATH)));
+        } catch (IOException ex) {
+            Logger.getLogger(ScilabJavaCompiler.class.getName()).log(Level.SEVERE, null, ex);
+        }
+
         CompilationTask task = compiler.getTask(out, manager, diagnostics, options, null, compilationUnits);
         boolean success = task.call();