简体   繁体   中英

How to add class files and folders to a jar file from a directory in Java

Hello people of stackoverflow :)

Today i have come across a problem which i need some help fixing.

I want to get the contents of a folder from my computer then add that contents into a jar file replacing any existing files already in that jar file. I am attempting to do this from within a java program.

I already wrote a method that will extract the contents of the jar file but i came up that this will be a faster and much more efficient method for what i have to do.

Any help with this would be greatly appreciated.

如果要从Java应用程序执行此操作,可以考虑Runtime.getRuntime().exec("your command")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM