如何向jar包⾥写⽂件
日本鬼怪String newFile = StringConstant.LINUX_JOB_DIRSUFFIX + emptyFileStr;
Path newpath = (newFile);//新的空的⽂件就是打算写⼊到jar⽂件⾥的
骏组词File emptyFile = File();
String tmpJarFileName = "";清明节晚上能出去吗
String globalVersion = Properties().getProperty("Flink.JarName");
String originalJarPath = StringConstant.LINUX_JOB_FILESUFFIX + globalVersion ;
饺子破皮歇后语下一句是什么Path pathToAddFile = Path();
Map<String, String> env = new HashMap<>();
env.put("create", "true");
for (int i = 0; i < coreSize; i++) {//从0开始
String uuid = UUID.randomUUID().toString().replaceAll("-", "");
tmpJarFileName = originalJarPath.substring(0, originalJarPath.length() - 4) + "-upgrade" + i + ".jar";
Path path = (tmpJarFileName);
URI uri = ate("jar:" + Uri());
// Writer writer = null;坐飞机不能带的东西有哪些?
try (FileSystem fs = wFileSystem(uri, env)) {// 向辅助空⽂件中写⼊uuid 并将空⽂件写⼊中间⽂件保证同⼀批次间使⽤的jar⽂件不同 Path nf = fs.getPath("emptyFile");//jar中要写⼊的⽂件名字
Writer writer = wBufferedWriter(nf, StandardCharsets.UTF_8, StandardOpenOption.CREATE);
writer.write(uuid);
writer.close();
// fs.close();
}
购买笔记本注意什么}
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论