diff --git a/build.gradle b/build.gradle index 021076b25..01300b87d 100644 --- a/build.gradle +++ b/build.gradle @@ -118,10 +118,7 @@ tasks.register('fullJar', Jar) { run { // Bad Cooja location detected with gradle run, explicitly pass -cooja. doFirst { - args += ['--cooja', "$projectDir", - '--javac', javaToolchains.compilerFor { - languageVersion = JavaLanguageVersion.of(javaVersion) - }.get().executablePath] + args += ['--cooja', "$projectDir"] } // Connect stdin to make the MSPSim CLI work, except when running in CI. if (System.getenv('CI') == null) { diff --git a/java/org/contikios/cooja/Cooja.java b/java/org/contikios/cooja/Cooja.java index dab56c9de..7086d56b8 100644 --- a/java/org/contikios/cooja/Cooja.java +++ b/java/org/contikios/cooja/Cooja.java @@ -1686,7 +1686,7 @@ public static void loadQuickHelp(final Object obj) { * values when creating a new simulation in the File menu. */ public record Config(LogbackColors logColors, boolean vis, String externalToolsConfig, - String logDir, String contikiPath, String coojaPath, String javac) {} + String logDir, String contikiPath, String coojaPath) {} public record LogbackColors(String error, String warn, String info, String fallback) {} private record PathIdentifier(String id, String path) {} diff --git a/java/org/contikios/cooja/Main.java b/java/org/contikios/cooja/Main.java index c81def80b..73774bed4 100644 --- a/java/org/contikios/cooja/Main.java +++ b/java/org/contikios/cooja/Main.java @@ -90,12 +90,6 @@ class Main { @Option(names = "--cooja", paramLabel = "DIR", description = "the Cooja directory") String coojaPath; - /** - * Option for specifying javac path. - */ - @Option(names = "--javac", paramLabel = "FILE", description = "the javac binary") - String javac; - /** * Option for specifying external user config file. */ @@ -295,22 +289,12 @@ public static void main(String[] args) { System.exit(1); } - if (options.mspSimPlatform == null && options.javac == null) { - System.err.println("Missing required option: '--javac=FILE'"); - System.exit(1); - } - - if (options.mspSimPlatform == null && !Files.exists(Path.of(options.javac))) { - System.err.println("Java compiler '" + options.javac + "' does not exist"); - System.exit(1); - } - if (options.mspSimPlatform == null) { // Start Cooja. // Use colors that are good on a dark background and readable on a white background. var colors = new LogbackColors(ANSIConstants.BOLD + "91", "96", ANSIConstants.GREEN_FG, ANSIConstants.DEFAULT_FG); var cfg = new Config(colors, options.gui, options.externalUserConfig, - options.logDir, options.contikiPath, options.coojaPath, options.javac); + options.logDir, options.contikiPath, options.coojaPath); Cooja.go(cfg, simConfigs); } else { // Start MSPSim. var config = new ArgumentManager(options.simulationFiles.toArray(new String[0]));