From b8bba206a392ad03d9b93a4cc8ceae0d45b92e2d Mon Sep 17 00:00:00 2001 From: zml59 Date: Thu, 23 Jan 2020 20:32:30 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=EF=BC=8Cwindows+bash=E4=B8=ADjar=E5=8C=85=E5=BC=95=E7=94=A8?= =?UTF-8?q?=E8=A6=81=E7=94=A8=E5=88=86=E5=8F=B7=E5=B9=B6=E4=B8=94=E5=8F=8C?= =?UTF-8?q?=E5=BC=95=E5=8F=B7=E9=9A=94=E5=BC=80?= 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 +++ system-out-system-err/solution.sh | 2 ++ 3 files changed, 7 insertions(+) diff --git a/compile-run-with-classpath/solution.sh b/compile-run-with-classpath/solution.sh index 292074f..893003e 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..6468525 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 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 abf67abdfc4919209f5a821f00301b0e6266d6db Mon Sep 17 00:00:00 2001 From: zml59 Date: Thu, 23 Jan 2020 20:44:43 +0800 Subject: [PATCH 2/4] =?UTF-8?q?windows+bash=E4=B8=ADjar=E5=8C=85=E5=BC=95?= =?UTF-8?q?=E7=94=A8=E8=A6=81=E7=94=A8=E5=88=86=E5=8F=B7=E5=B9=B6=E4=B8=94?= =?UTF-8?q?=E5=8D=95=E5=BC=95=E5=8F=B7=E8=80=8C=E4=B8=8D=E6=98=AF=E5=8F=8C?= =?UTF-8?q?=E5=BC=95=E5=8F=B7=E9=9A=94=E5=BC=80?= 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 893003e..0fbc459 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 From b1116bde7fae653c0e87b0d9732fcee7192ecbab Mon Sep 17 00:00:00 2001 From: zml59 Date: Thu, 23 Jan 2020 20:53:23 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E8=BF=98=E5=8E=9F=E6=88=90linux=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E5=91=BD=E4=BB=A4=E8=A1=8C=E6=A0=BC=E5=BC=8F?= 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 0fbc459..d962f93 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 From 0a7b0b5220b70b37f6fe6fd7b32cd7e73cc9ab38 Mon Sep 17 00:00:00 2001 From: zml59 Date: Thu, 23 Jan 2020 20:57:30 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=BF=98=E5=8E=9F=E6=88=90linux=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E5=91=BD=E4=BB=A4=E8=A1=8C=E6=A0=BC=E5=BC=8F,AAA?= =?UTF-8?q?=E6=BC=8F=E5=8A=A0;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- read-env-variable-system-property/solution.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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