- 博客(2)
- 收藏
- 关注
原创 Java代码调用Linux命令
1. 调用cp命令// 使用数组的方式可以解决上传的文件名包含特殊字符 空格等String[] shell = new String[]{"cp", oldPath, newPath};Process process = Runtime.getRuntime().exec(shell); // 使用new RunThread方式解决waitFor会阻塞线程或死锁问题new RunThread(process.getInputStream(), "INFO").start();new Run
2021-03-04 10:25:24 220 1
原创 上G文件复制的三种方法
需求: 通过tomcat上传到指定目录,成功后复制到指定目录下,大文件复制方式:1. 通过文件流方式(文件越大速度越慢) public static void copyFile(String oldPath, String newPath) { int byteread = 0; File oldFile = new File(oldPath); if (oldFile.exists()) { //文件存在时 tr
2021-03-04 10:16:42 1288 2
org.zeroturnaround.jrebel-maven-plugin 1.1.6
2023-03-23
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人