File class
路径分割符
- File.seperator : "/" or "\"
- File.pathSeperator: ":" or ";"
当前路径 pwd
参考
user.dir
1 2System.getProperty("user.dir") File(".").getCanonicalPath()- jvm 调用 application 位置
Paths
1Paths.get(".").toAbsolutePath().normalize().toString();
Java Process
创建
- ProcessBuild().start() 创建
- Runtime.getRuntime().exec() 创建
unittest
异常测试
| |
call_shell
imageMagick
安装
| |
报错
pdf security 报错
引用
方法
Well, I added
<policy domain="coder" rights="read | write" pattern="PDF" />
just before </policymap> in /etc/ImageMagick-7/policy.xml and that makes it work again, but not sure about the security implications of that.
截图
-crop
1convert -density 200 ./one.pdf -quality 100 -colorspace gray -crop 500x500+500+500 "./one_300.jpg"