From 3a504a1274a85379146852f1c0d3b1a83a3e569f Mon Sep 17 00:00:00 2001 From: XuKaiQuan <964262001@qq.com> Date: Sat, 19 Dec 2020 10:41:35 +0800 Subject: [PATCH 1/4] =?UTF-8?q?javac=E4=B8=8Ejava=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E7=BB=83=E4=B9=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compile-run-with-classpath/solution.sh | 3 +++ read-env-variable-system-property/solution.sh | 3 +++ system-out-system-err/solution.sh | 2 ++ 3 files changed, 8 insertions(+) diff --git a/compile-run-with-classpath/solution.sh b/compile-run-with-classpath/solution.sh index 292074f..772259f 100644 --- a/compile-run-with-classpath/solution.sh +++ b/compile-run-with-classpath/solution.sh @@ -7,3 +7,6 @@ # First argument is blank: true # Second argument is blank: true # Third argument is blank: false +a= '*' +javac -cp commons-lang3-3.9.jar StringIsBlank.java +java -cp ./commons-lang3-3.9.jar:. StringIsBlank "" ' ' a diff --git a/read-env-variable-system-property/solution.sh b/read-env-variable-system-property/solution.sh index 1dfb638..029d052 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 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 92ab258006268eb99fa5d46bc52167205e057a49 Mon Sep 17 00:00:00 2001 From: XuKaiQuan <964262001@qq.com> Date: Sat, 19 Dec 2020 10:43:18 +0800 Subject: [PATCH 2/4] =?UTF-8?q?javac=E4=B8=8Ejava=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E7=BB=83=E4=B9=A0?= 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 772259f..7e97f3b 100644 --- a/compile-run-with-classpath/solution.sh +++ b/compile-run-with-classpath/solution.sh @@ -7,6 +7,6 @@ # First argument is blank: true # Second argument is blank: true # Third argument is blank: false -a= '*' +a='*' javac -cp commons-lang3-3.9.jar StringIsBlank.java java -cp ./commons-lang3-3.9.jar:. StringIsBlank "" ' ' a From d6190a7b9647f835175cde1c70066a762a8a6cb8 Mon Sep 17 00:00:00 2001 From: XuKaiQuan <964262001@qq.com> Date: Sat, 19 Dec 2020 10:45:31 +0800 Subject: [PATCH 3/4] =?UTF-8?q?javac=E4=B8=8Ejava=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E7=BB=83=E4=B9=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compile-run-with-classpath/solution.sh | 1 + read-env-variable-system-property/solution.sh | 2 +- system-out-system-err/solution.sh | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/compile-run-with-classpath/solution.sh b/compile-run-with-classpath/solution.sh index 7e97f3b..d7af4e4 100644 --- a/compile-run-with-classpath/solution.sh +++ b/compile-run-with-classpath/solution.sh @@ -10,3 +10,4 @@ a='*' javac -cp commons-lang3-3.9.jar StringIsBlank.java java -cp ./commons-lang3-3.9.jar:. StringIsBlank "" ' ' a + diff --git a/read-env-variable-system-property/solution.sh b/read-env-variable-system-property/solution.sh index 029d052..6468525 100644 --- a/read-env-variable-system-property/solution.sh +++ b/read-env-variable-system-property/solution.sh @@ -8,4 +8,4 @@ # System property BBB: ' export AAA='$A' javac ReadEnvironmentVariableAndSystemProperty.java -java -DBBB="'" ReadEnvironmentVariableAndSystemProperty \ No newline at end of file +java -DBBB="'" ReadEnvironmentVariableAndSystemProperty diff --git a/system-out-system-err/solution.sh b/system-out-system-err/solution.sh index b96c5b0..13d9256 100644 --- a/system-out-system-err/solution.sh +++ b/system-out-system-err/solution.sh @@ -3,4 +3,4 @@ # 1. 在当前目录中,使用javac命令编译PrintSystemOutSystemErr.java # 2. 在当前目录中,使用java命令运行PrintSystemOutSystemErr,使其标准输出和标准错误都重定向到当前目录下一个名为output.txt的文件中 javac PrintSystemOutSystemErr.java -java PrintSystemOutSystemErr > output.txt 2>&1 \ No newline at end of file +java PrintSystemOutSystemErr > output.txt 2>&1 From e51d774d36777c60bc00067c9ca6aebd4b73b557 Mon Sep 17 00:00:00 2001 From: XuKaiQuan <964262001@qq.com> Date: Sat, 19 Dec 2020 10:49:44 +0800 Subject: [PATCH 4/4] =?UTF-8?q?javac=E4=B8=8Ejava=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E7=BB=83=E4=B9=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compile-run-with-classpath/solution.sh | 3 +-- read-env-variable-system-property/solution.sh | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/compile-run-with-classpath/solution.sh b/compile-run-with-classpath/solution.sh index d7af4e4..66fe8da 100644 --- a/compile-run-with-classpath/solution.sh +++ b/compile-run-with-classpath/solution.sh @@ -7,7 +7,6 @@ # First argument is blank: true # Second argument is blank: true # Third argument is blank: false -a='*' javac -cp commons-lang3-3.9.jar StringIsBlank.java -java -cp ./commons-lang3-3.9.jar:. StringIsBlank "" ' ' a +java -cp commons-lang3-3.9.jar:. StringIsBlank "" " " "*" diff --git a/read-env-variable-system-property/solution.sh b/read-env-variable-system-property/solution.sh index 6468525..200b68d 100644 --- a/read-env-variable-system-property/solution.sh +++ b/read-env-variable-system-property/solution.sh @@ -6,6 +6,6 @@ # 使得该java命令输出: # Environment variable AAA: $A; # System property BBB: ' -export AAA='$A' +export AAA='$A;' javac ReadEnvironmentVariableAndSystemProperty.java java -DBBB="'" ReadEnvironmentVariableAndSystemProperty