From e59cca82f01538c952ebaf1150570c4fb1dd3271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=86S?= Date: Sun, 1 Oct 2023 22:06:53 +0530 Subject: [PATCH] fix: issue #49 --- src/run-code/instructions.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/run-code/instructions.js b/src/run-code/instructions.js index 8a99b24..bdcf9c6 100644 --- a/src/run-code/instructions.js +++ b/src/run-code/instructions.js @@ -4,9 +4,13 @@ const commandMap = (jobID, language) => { switch (language) { case 'java': return { + compileCodeCommand: 'javac', + compilationArgs: [ + join(process.cwd(), `codes/${jobID}.java`) + ], executeCodeCommand: 'java', executionArgs: [ - join(process.cwd(), `codes/${jobID}.java`) + join(process.cwd(), `codes/${jobID}`) ], compilerInfoCommand: 'java --version' }; @@ -81,4 +85,4 @@ const commandMap = (jobID, language) => { const supportedLanguages = ['java', 'cpp', 'py', 'c', 'js', 'go', 'cs']; -module.exports = {commandMap, supportedLanguages} \ No newline at end of file +module.exports = {commandMap, supportedLanguages}