Skip to content

Commit c254bbd

Browse files
committed
update java and add docker
1 parent 34aad38 commit c254bbd

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

Java学习之路.md

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ test/Test.class
251251

252252
使用 unzip 来解压 JAR 文件:在介绍 JAR 文件的时候就已经说过了,JAR 文件实际上就是 ZIP 文件,所以可以使用常见的一些解压 ZIP 文件的工具来解压 JAR 文件,如 Windows 下的 WinZip、WinRAR 等和 Linux 下的 unzip 等。使用 WinZip 和 WinRAR 等来解压是因为它们解压比较直观,方便。而使用 unzip,则是因为它解压时可以使用 -d 参数指定目标目录。在解压一个 JAR 文件的时候是不能使用 jar 的 -C 参数来指定解压的目标的,因为 -C 参数只在创建或者更新包的时候可用。那么需要将文件解压到某个指定目录下的时候就需要先将这具 JAR 文件拷贝到目标目录下,再进行解压,比较麻烦。如果使用 unzip,就不需要这么麻烦了,只需要指定一个 -d 参数即可。如:
253253

254-
unzip test.jar -d dest/
254+
unzip test.jar -d dest/
255255

256256
使用 WinZip 或者 WinRAR 等工具创建 JAR 文件:上面提到 JAR 文件就是包含了 META-INF/MANIFEST 的 ZIP 文件,所以,只需要使用 WinZip、WinRAR 等工具创建所需要 ZIP 压缩包,再往这个 ZIP 压缩包中添加一个包含 MANIFEST 文件的 META-INF 目录即可。对于使用 jar 命令的 -m 参数指定清单文件的情况,只需要将这个 MANIFEST 按需要修改即可。
257257

@@ -387,35 +387,21 @@ File.getCanonicalPath()和File.getAbsolutePath()大约只是对于new File(".")
387387
比如当前的路径为 C:\test :
388388

389389
File directory = new File("abc");
390-
391390
directory.getCanonicalPath(); //得到的是C:\test\abc
392-
393391
directory.getAbsolutePath(); //得到的是C:\test\abc
394-
395392
direcotry.getPath(); //得到的是abc
396393

397-
398-
399394
File directory = new File(".");
400-
401395
directory.getCanonicalPath(); //得到的是C:\test
402-
403396
directory.getAbsolutePath(); //得到的是C:\test\.
404-
405397
direcotry.getPath(); //得到的是.
406398

407-
408-
409399
File directory = new File("..");
410-
411400
directory.getCanonicalPath(); //得到的是C:\
412-
413401
directory.getAbsolutePath(); //得到的是C:\test\..
414-
415402
direcotry.getPath(); //得到的是..
416403

417404

418-
419405
## System.getenv()
420406

421407
getenv是获取系统的环境变更,对于windows对在系统属性-->高级-->环境变量中设置的变量将显示在此(对于linux,通过export设置的变量将显示在此)

docker学习之路.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
* http://www.docker.com/
2+
* https://hub.docker.com/
3+
* Docker —— 从入门到实践: https://www.gitbook.com/book/yeasy/docker_practice/details
4+
* docker中文: http://www.docker.org.cn/
5+
* DOCKER windows安装: http://blog.csdn.net/zistxym/article/details/42918339
6+
* boot2docker: http://boot2docker.io/

0 commit comments

Comments
 (0)