Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions compile-run-with-classpath/solution.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env sh
javac -classpath commons-lang3-3.9.jar StringIsblank.java
java -cp commons-lang3-3.9.jar:. StringIsblank "" '' '*'

# 请在这里编写两条命令:
# 1. 在当前目录中,使用javac命令编译StringIsBlank.java
# 2. 在当前目录中,使用java命令运行StringIsBlank,并传递三个参数:第一个参数是一个空字符串,第二个参数是一个空格,第三个参数是一个星号字符*
Expand Down
3 changes: 3 additions & 0 deletions read-env-variable-system-property/solution.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env sh
# 请在这里编写三条命令:
export AAA='$A;'
javac ReadEnvironmentVariableAndSystemProperty.java
java -DBBB="'" ReadEnvironmentVariableAndSystemProperty
# 1. 导出一个环境变量AAA,值是"$A;"(不包含双引号)
# 2. 在当前目录中,使用javac命令编译ReadEnvironmentVariableAndSystemProperty.java
# 3. 在当前目录中,使用java命令运行ReadEnvironmentVariableAndSystemProperty,并传递系统属性(System property)BBB,值为'(一个单引号)
Expand Down
2 changes: 2 additions & 0 deletions system-out-system-err/solution.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env sh
# 请在这里编写两条命令:
javac PrintSystemOutSystemErr.java
java PrintSystemOutSystemErr >output.txt 2>&1
# 1. 在当前目录中,使用javac命令编译PrintSystemOutSystemErr.java
# 2. 在当前目录中,使用java命令运行PrintSystemOutSystemErr,使其标准输出和标准错误都重定向到当前目录下一个名为output.txt的文件中