|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
JCN - Add (External) Class Folder |
« View previous topic :: View next topic » |
Author |
Message
|
wmbmqted |
Posted: Sun Feb 17, 2013 9:32 am Post subject: JCN - Add (External) Class Folder |
|
|
Newbie
Joined: 16 Jan 2013 Posts: 5
|
Hi,
My environment: WMB 8.0.0.1 on s390x
I have requirement to convert file using third part library which consists of jars and folder with property files.
My flow is: FIN -> JCN -> FON
In Project properties Java Build Path/Libraries i added external jars (I also copied jars into shared-classes folder and restart the broker).
Now i also need add folder to project so i tried to:
Copy this folder into project and in project properties add Class folder (Java Build Path/Libraries/Add Class Folder)
Add external class folder in project properties (Java Build Path/Libraries/Add External Class Folder) and copy this folder into shared-classes folder and restart the broker
In both cases i recive an error with message that folder with properties file can not be found. I look for information in info center but with no success.
Any suggestion how to add a folder?
Thanks and Regads |
|
Back to top |
|
 |
mqjeff |
Posted: Sun Feb 17, 2013 12:16 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Toolkit configuration does not affect runtime configuration.
You should create a JavaClassloader Configurable Service for your specific JCN to use. You can then control the location of the classes, including the external jar files, and you can designate a specific location for the shared-classes classloader to read from, which will likely be where you need to put the properties files in question.
But property file loading is significantly complicated in MOST Java environments, outside of plain bog standard JSE using javaw started from a command line. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Mon Feb 18, 2013 6:00 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
mqjeff wrote: |
property file loading is significantly complicated |
In your JavaClassloader Configurable service, your classloading order should first point to the directory where the properties files are, then next to the classes that use those properties. Don't put the props in the same directory as the jars. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
wmbmqted |
Posted: Tue Mar 05, 2013 4:49 am Post subject: |
|
|
Newbie
Joined: 16 Jan 2013 Posts: 5
|
I solve problem with:
- create new java project
- put folders into java project
- export as jar file
- copy jar file into shared-classes folder
Thanks for help and regards, |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Mar 05, 2013 5:10 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
wmbmqted wrote: |
- copy jar file into shared-classes folder |
Don't do that.
Create a JavaClassloader configurable service, that specifies the location of a new shared-classes.
Also, I sincerely hope you are not doing this to use log4j or logback, when you should be using java.util.logging instead. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|