Extension Testing

A few weeks back I documented an extension I built for a potential customer that passed a chunk of the XML tree out and passed back some formatted text.

Well I have another coming up, more of that later this week. One problem was how to test the extension in the template builder. It was a bit of a pain, having to merge the extension class and any supporting classes into an existing zip or jar that the builder knew about.

Today, I actually bothered to reach out to 'template builder meister' Junichi and ask if I could add a classpath command or in some way include my extension jar. Ask and you shall receive ... simple stuff, this communicating with people :0)

Just open RTF2PDF.jar under jlib directory, for me thats 'D:\Program Files\Oracle\BIP\BIP Desktop\Template Builder for Word\jlib'. You will see MANIFEST.MF file inside. Back up that files and then add a file path to class-path in the manifest file, the new jar/zip will be used when you run the preview.

The manifest file looks like this out of the box

Manifest-Version: 1.0
Class-Path: ./activation.jar ./mail.jar ./xdochartstyles.jar ./bicmn.
jar ./jewt4.jar ./share.jar ./bipres.jar ./xdoparser.jar ./xdocore.ja
r ./xmlparserv2.jar ./xmlparserv2-904.jar ./i18nAPI_v3.jar ./version
info.jar
Main-Class: RTF2PDF

With my extension and supporting library I now have

Manifest-Version: 1.0
Class-Path: ./activation.jar ./mail.jar ./xdochartstyles.jar ./bicmn.
jar ./jewt4.jar ./share.jar ./bipres.jar ./xdoparser.jar ./xdocore.ja
r ./xmlparserv2.jar ./xmlparserv2-904.jar ./i18nAPI_v3.jar ./version
info.jar D:/Work/idauto/idfontextension.zip D:/Work/idauto/LinearBarCode.jar
Main-Class: RTF2PDF


Update



Typo in the file above. you can only use relative folder references ie the file above will not work. I just dropped my jars and zips into the same jlib folder and used

Manifest-Version: 1.0
Class-Path: ./activation.jar ./mail.jar ./xdochartstyles.jar ./bicmn.
jar ./jewt4.jar ./share.jar ./bipres.jar ./xdoparser.jar ./xdocore.ja
r ./xmlparserv2.jar ./xmlparserv2-904.jar ./i18nAPI_v3.jar ./version
info.jar ./idfontextension.zip ./LinearBarCode.jar
Main-Class: RTF2PDF

as my file entry ... works great!

When I now hit preview for any of the formats supported my extension is pulled in without the need for all that merging.
If you are now wondering how I opened the RTF2PDF.jar file, I used winzip or zip or you could use the java tools.
Thanks for the tip Junichi. Big prizes for anyone guessing what my latest extension project has been. OK there's no prize but you'll get a mention :0)

Comments:

I might be late to respond to this one. The class path gives it away it's the barcode generation module from ID Automation. Incidentally, we use it heavily from Oracle Reports on Linux. And since we are contemplating a move to BIP Enterprise, the fact that you are testing this is good timing from my perspective. Manish

Posted by Manish on July 07, 2009 at 01:14 AM MDT #

What am I to Think about Easter? ,

Posted by Faggot67 on October 21, 2009 at 10:10 PM MDT #

They have opened the job as a full-time position, which means my temp job will no longer exist and I have to apply for the full time one. ,

Posted by Gangster50 on October 22, 2009 at 09:21 PM MDT #

I stumbled upon your webpage and it truly is ideal for I need. It contains brilliant and useful content. I examined nearly all of them and got lots from them. In my opinion, you are putting in a fantastic work. Stick with it! I'd like to grate you for creating such a lovely blog.

Posted by Gay Athay on October 10, 2010 at 06:49 AM MDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Follow bipublisher on Twitter Find Us on Facebook BI Publisher Youtube ChannelDiscussion Forum

Join our BI Publisher community to get the most and keep updated with the latest news, How-to, Solutions! Share your feedback and let us hear your voice @bipublisher on Twitter, on our official Facebook page, and Youtube!

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today