From 2190be91ddc8da7639b9755d3a862ca62c466747 Mon Sep 17 00:00:00 2001 From: TangsongyuanmingQingHAD Date: Mon, 6 Jan 2020 15:56:53 +0800 Subject: [PATCH 1/3] =?UTF-8?q?window=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compile-run-with-classpath/solution.sh | 2 ++ read-env-variable-system-property/solution.sh | 3 +++ 2 files changed, 5 insertions(+) diff --git a/compile-run-with-classpath/solution.sh b/compile-run-with-classpath/solution.sh index 292074f..4f274ee 100644 --- a/compile-run-with-classpath/solution.sh +++ b/compile-run-with-classpath/solution.sh @@ -7,3 +7,5 @@ # First argument is blank: true # Second argument is blank: true # Third argument is blank: false +javac -cp commons-lang3-3.9.jar StringIsBlank.java +java -cp 'commons-lang3-3.9.jar;.' StringIsBlank '' " " " *" \ No newline at end of file diff --git a/read-env-variable-system-property/solution.sh b/read-env-variable-system-property/solution.sh index 1dfb638..965fc83 100644 --- a/read-env-variable-system-property/solution.sh +++ b/read-env-variable-system-property/solution.sh @@ -6,3 +6,6 @@ # 使得该java命令输出: # Environment variable AAA: $A; # System property BBB: ' +export AAA='$A;' +javac ReadEnvironmentVariableAndSystemProperty.java +java -DBBB="'" ReadEnvironmentVariableAndSystemProperty \ No newline at end of file From 23066868bc30eb99d199418cdc0b9cd79dd7c272 Mon Sep 17 00:00:00 2001 From: TangsongyuanmingQingHAD Date: Mon, 6 Jan 2020 15:58:07 +0800 Subject: [PATCH 2/3] =?UTF-8?q?window=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- system-out-system-err/solution.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/system-out-system-err/solution.sh b/system-out-system-err/solution.sh index 5cdeb2b..b96c5b0 100644 --- a/system-out-system-err/solution.sh +++ b/system-out-system-err/solution.sh @@ -2,3 +2,5 @@ # 请在这里编写两条命令: # 1. 在当前目录中,使用javac命令编译PrintSystemOutSystemErr.java # 2. 在当前目录中,使用java命令运行PrintSystemOutSystemErr,使其标准输出和标准错误都重定向到当前目录下一个名为output.txt的文件中 +javac PrintSystemOutSystemErr.java +java PrintSystemOutSystemErr > output.txt 2>&1 \ No newline at end of file From 96a5b02bd7bbecd6183fd6fa200ed7d911ead69f Mon Sep 17 00:00:00 2001 From: TangsongyuanmingQingHAD Date: Mon, 6 Jan 2020 16:00:52 +0800 Subject: [PATCH 3/3] =?UTF-8?q?window=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compile-run-with-classpath/solution.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compile-run-with-classpath/solution.sh b/compile-run-with-classpath/solution.sh index 4f274ee..20e2e80 100644 --- a/compile-run-with-classpath/solution.sh +++ b/compile-run-with-classpath/solution.sh @@ -8,4 +8,4 @@ # Second argument is blank: true # Third argument is blank: false javac -cp commons-lang3-3.9.jar StringIsBlank.java -java -cp 'commons-lang3-3.9.jar;.' StringIsBlank '' " " " *" \ No newline at end of file +java -cp commons-lang3-3.9.jar:. StringIsBlank '' " " " *" \ No newline at end of file