Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jndi.properties location  RSS feed

 
Chris Reeves
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a stand alone app that is generating JMS messages.
I have the client packaged in a jar, and it is placed along with its supporting jars in a /lib directory. The other jars are referenced in the manifest, and the client works as expected. The rest of the client is structured as follows:
/bin - shell script to run client
/conf - config files
/lib - jars
/logs - logs
However, I am struggling with the jndi.properties file. The client is picking up a file somewhere else, as it is not reading the one I have placed in conf (which I reference in the Class-path: in the jar manifest. I tried moving it to /lib, and changing the manifest too, but to no avail.
Where can I place this file so it will be read properly, without having to read it programmatically? I've tried passing it in the classpath from the shell script, but that doesn't work either. If I reference it with -D, what key do I use? -D[key]=conf/jndi.properties
 
Tim Holloway
Bartender
Posts: 18661
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that that very much depends on what you're using as a jndi server. In the JOnAS system I run here, the JOnAS system comes with its own registry server and it gets its properties from the jonas.properties file.
 
Mat Robinson
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe that the file has to be in a directory that is in the classpath (as opposed to the file itself).
Mat.
 
Chris Reeves
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A directory, but not a file in the classpath. Well, that seems quite strange, but I'll give it a shot.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!