jar包执行完删除自己

可以利用Runtime.getRuntime().exec

Runtime.getRuntime().exec("cmd /c ping localhost -n 2 > nul && del Delete.jar");

2表示2秒, Delete.jar是文件名.

发布了137 篇原创文章 · 获赞 49 · 访问量 37万+

猜你喜欢

转载自blog.csdn.net/MAIMIHO/article/details/94030942