File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes location Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark " location" Watch " location" New topic
Author location

Chris Reeves
Ranch Hand

Joined: Apr 03, 2002
Posts: 95
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 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/
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17282

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 file.

An IDE is no substitute for an Intelligent Developer.
Mat Robinson

Joined: Aug 02, 2002
Posts: 20
I believe that the file has to be in a directory that is in the classpath (as opposed to the file itself).
Chris Reeves
Ranch Hand

Joined: Apr 03, 2002
Posts: 95
A directory, but not a file in the classpath. Well, that seems quite strange, but I'll give it a shot.
I agree. Here's the link:
subject: location
It's not a secret anymore!