Results 1 to 5 of 5
Thread: How to Patch a jar file?
- 12-16-2009, 07:55 AM #1
Member
- Join Date
- Nov 2008
- Posts
- 43
- Rep Power
- 0
How to Patch a jar file?
Hello, so this is completely foreign material for me. What I am wanting to do is create a program, make a jar along with other support files and then distribute this software. I then want to be able to have this program check if I have a new version available then update itself.
For support files I imagine I would just download the new files and then delete any old files if I have to, that shouldnt be a problem. The thing I have no idea is how to update the jar file. Lets say I add a new feature to my program and I want everyone who is using it to have that new feature without having to download my distribution again, how would I go about doing this?
When I try to find stuff about patching on the net I seem to always just find patching related to repositorys. Can someone point me in the right direction about patching a program? I dont even know where to begin.
Many Thanks
- 12-16-2009, 09:26 AM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,400
- Blog Entries
- 7
- Rep Power
- 17
Google for "Java Rebel"; basically it's a classloader that allows classes to be "hot swapped" when their file image changed. All you have to do is change your .jar file and your running application notices the change and reloads the classes that were already loaded (with the old version). It's a quite nifty piece of software.
kind regards,
Jos
- 12-16-2009, 08:40 PM #3
Member
- Join Date
- Nov 2008
- Posts
- 43
- Rep Power
- 0
Sounds intresting, I'll definitely look into it, thanks for the advice!
- 12-16-2009, 09:17 PM #4
Member
- Join Date
- Nov 2008
- Posts
- 43
- Rep Power
- 0
Java rebel is pretty neat but I don't think it does what I require.
Suppose i make a minor change to the code to add a feature. Java rebel does a really good job of reloading that class for me as I develope it but that works because I have the source on my computer. My problem is applying this change to the clients already built jar file.
Im thinking maybe have a bootstrap jar file that is the main jar file you load, then that checks if there is an update and it will transfer the new jar from the server to their computer and then load it afterwards. This way the client dosent have to keep checking for updates and the bootstrap shouldnt need to change ever. Anyone ever done anything like this? I guess its kind of like applications that have splash screens that have update and launch options
- 12-17-2009, 11:18 AM #5
Moderator
- Join Date
- Apr 2009
- Posts
- 10,460
- Rep Power
- 16
Similar Threads
-
How to apply a patch (Call Matlab from Java)
By Niroshan in forum Advanced JavaReplies: 6Last Post: 07-09-2011, 02:55 AM -
how to read openproj(Projity) file i.e. ,POD file(Project Management file)
By mahendra.athneria in forum New To JavaReplies: 0Last Post: 02-11-2009, 09:53 AM -
Patch Application Stupidity (mine!)
By LoTech in forum New To JavaReplies: 5Last Post: 09-17-2008, 02:57 AM -
How to parse the CSV(Comma separation values)file and validate the file using java
By padmajap13 in forum Advanced JavaReplies: 7Last Post: 05-23-2008, 03:46 AM -
Need help in releasing a patch to Java application
By venusunil in forum Advanced JavaReplies: 1Last Post: 10-31-2007, 09:35 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks