|
-
Jan 28th, 2012, 12:50 PM
#1
Thread Starter
Fanatic Member
adding files to a jar archive?
I want to add/replace some files in a jar archive, and I have no idea where to start, could someone point me in the right direction?
-
Jan 28th, 2012, 02:08 PM
#2
Addicted Member
Re: adding files to a jar archive?
Jars are archives. So you could use SharpZipLib.
-
Jan 28th, 2012, 02:33 PM
#3
Addicted Member
Re: adding files to a jar archive?
SharpZipLib
Code:
Imports ICSharpCode.SharpZipLib.Zip
Public Sub AddFileToJar(ByVal sJarPath As String, ByVal sFileNamePath As String)
Try
Dim zipFile As New ZipFile(sJarPath)
zipFile.BeginUpdate()
zipFile.Add(sFileNamePath, "filename")
zipFile.CommitUpdate()
zipFile.Close()
Catch ex As Exception
End Try
End Sub
"filename" is optional, but if it's empty then the file will be added with name same as its fullpath.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|