Results 1 to 3 of 3
- 08-04-2009, 10:09 AM #1
Member
- Join Date
- Aug 2009
- Location
- UK
- Posts
- 2
- Rep Power
- 0
Best practice for packaging add-ons
I am currently in the middle of reworking a custom apache-tomcat application and want to take the opportunity to resolve numerous problems we had with the old version.
A large number of our customers ask for specific customisations of the product which which do for them. The problem is that we are constantly working on the product adding new features/bug fixing etc and this means all the customizations need to be merged in if we upgrade those customers.
To try and solve a the majority of these situations I have been working on a rendering engine. Each screen in the application has a settings file, FreeMarker template and java class to render/process the screen through the use of reflections. These files will exist in a 'standard' directory. A customized version of these files can be placed in a 'custom' directory and these will be automatically used instead. In addition I can add new screens into the 'custom' directory for a customer. The theory is that we can easily upgrade and overwrite the 'standard' directory without touching their customisations.
What I would like to do however is package the three files (or more if required) into a single 'add-on' file. I've not used jars too much and whilst reading up about them found there are a few different archive formats including war, rar (not winrar) and ear. Which would be the most suitable and why? I generally need to include one or more of the following file type: .class .xml .ftl
- 08-04-2009, 11:36 AM #2
Member
- Join Date
- Aug 2009
- Location
- Kharkov, Ukraine
- Posts
- 29
- Rep Power
- 0
I think that plain jar is the most suitable here.
war is for web apps.
rar is for resource adapters.
ear is for packing all of those together.
- 08-05-2009, 10:51 PM #3
Member
- Join Date
- Aug 2009
- Location
- UK
- Posts
- 2
- Rep Power
- 0
Thanks for the reply. After much reading up etc I managed to package the files into a jar and access them at run time but as the class stored in the jar references other classes not contained within the jar the class loader throws a NoClassDefFoundError exception.
I'm thinking it might be less hassle forgetting this idea and stick to separate files. :( I have learnt a couple of new things though so it was worth looking into.
Similar Threads
-
Packaging all files into a single executable .jar
By ichwar in forum New To JavaReplies: 5Last Post: 01-27-2010, 01:31 AM -
SCJA - practice
By Mihail Kravsun in forum Java CertificationReplies: 2Last Post: 04-29-2009, 07:26 AM -
Packaging and Running Java Apps
By JL4 in forum New To JavaReplies: 1Last Post: 04-08-2009, 07:17 PM -
Packaging Driver and Applet
By ibanez270dx in forum New To JavaReplies: 0Last Post: 11-14-2007, 01:18 AM -
Packaging and accessing data files
By todd in forum Advanced JavaReplies: 1Last Post: 08-01-2007, 12:27 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks