See sub-section "How to Package Nested Jar Files" in section "5.2 Building
a Java STAF Service" at
http://staf.sourceforge.net/current/stafsdg.html#Header_Building_Java_Service.
If you are still having a problem after following these instructions,
provide the output from: jar tf YourSTAFService.jar
How to Package Nested Jar Files
You can also package nested jar files within your service's jar file. If
your service requires additional jar files, rather than having your
service users download the jar file and add it to the CLASSPATH, you can
nest the additional jar files within your service's jar file.
To include nested jar files, you must have the following entry in the
service's MANIFEST.MF file:
Packaged-Jars: <list of space-separated jar file names, without the .jar
suffix>
Here is an example of nesting xercesImpl.jar, xmlParserAPIs.jar, and
jython.jar:
Packaged-Jars: xercesImpl xmlParserAPIs jython
Note that the nested jar files must reside in the STAF-INF/jars directory
when creating the service jar file. For the example shown above, the
service jar file would contain the following:
STAF-INF/jars/
STAF-INF/jars/xercesImpl.jar
STAF-INF/jars/xmlParserAPIs.jar
STAF-INF/jars/jython.jar
When you register your service with STAF, the embedded jar files should be
located in:
{STAF/DataDir}/lang/java/service/<service-name>/jars
Note that you do not need to include the nested jar files in the
CLASSPATH. STAF's class loader will be able to find the classes contained
within the jar files.
--------------------------------------------------------------
Sharon Lucas
IBM Austin, luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313
clayton neal <clayton_n...@yahoo.co.uk>
06/17/2009 10:28 AM
To
staf-users@lists.sourceforge.net
cc
Subject
[staf-users] external jar files
Hiya
Ive written a new service in Java and packaged into a .jar file
My service needs to connect to oracle so also needs the oracle jdbc jar
file
On the test machine ive placed both .jar files into the same directory
In the maifest for the service i put:
Class-Path: ojdbc6.jar
to point to oracle .jar file.
The problem is when i add my service, i get an exception, saying it cant
find the oracle classes
Can anyone help?!
Cheers
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users