diff --git a/README.md b/README.md index dcd28b0..3147683 100644 --- a/README.md +++ b/README.md @@ -29,11 +29,18 @@ any folder on your computer. (Note for macOS users: do not unzip the SPARK distr folder such as Documents, Downloads, or Desktop.) Double click `SPARK_Manager.jar` in a file manager to run SPARK. If it does not work then run SPARK from the command line: +macOS/Linux: ```bash cd 'name of SPARK directory' bin/spark-manager ``` +Windows: +```bash +cd 'name of SPARK directory' +bin\spark-manager +``` + ## Documentation Documentation can be found at diff --git a/spark-logo/src/main/java/org/sparklogo/gui/Project.java b/spark-logo/src/main/java/org/sparklogo/gui/Project.java index 25fa095..61da6c5 100644 --- a/spark-logo/src/main/java/org/sparklogo/gui/Project.java +++ b/spark-logo/src/main/java/org/sparklogo/gui/Project.java @@ -357,15 +357,7 @@ public void compile(File sparkLibPath) throws Exception { // Get all java files in the output folder and its sub-folders ArrayList javaFiles = ProjectFile.findAllFiles(output, - new FilenameFilter() { - public boolean accept(File dir, String fname) { - if (fname.endsWith(".java")) - return true; - else - return false; - } - - }, true); + (dir, fname) -> fname.endsWith(".java"), true); // Create a compiler parameters string // compilerArgs.add("-verbose"); @@ -382,14 +374,14 @@ public boolean accept(File dir, String fname) { final String path = sparkLibPath.getPath(); String jars = Arrays.stream(LIBS) .map(lib -> Paths.get(path, lib).toAbsolutePath().toString()) - .collect(Collectors.joining(":")); + .collect(Collectors.joining(File.pathSeparator)); // System.out.println("jars = " + jars); //compilerArgs.add(sparkCorePath.getParent()); compilerArgs.add(jars); - for (int i = 0; i < javaFiles.size(); i++) { - compilerArgs.add(javaFiles.get(i).getPath()); + for (File javaFile : javaFiles) { + compilerArgs.add(javaFile.getPath()); } // Get the javac compiler @@ -397,6 +389,8 @@ public boolean accept(File dir, String fname) { if (compiler == null) { // Try to use the compiler as an external process compilerArgs.add(0, "javac"); + System.out.println("Compiling java files..."); + System.out.println(String.join(" ", compilerArgs)); try { Process proc = Runtime.getRuntime().exec( @@ -430,6 +424,7 @@ public boolean accept(File dir, String fname) { args = compilerArgs.toArray(args); System.out.println("Compiling java files..."); + System.out.println(String.join(" ", args)); int result = compiler.run(null, null, null, args);