normally this should work. Could you provide us with some information about your project file structure? Do you bundle it in a jar file? Do you start it using your IDE?
You might try to replace the relative path with "conf/auth.conf" (removing the leading dotslash).
I start my client in the IDE as a standalone java program. I tried removing the "." but it made no difference.
I don't bundle it in a jar file. Do I need to?
What is the working direrctory that you set for the Java app? It should be on the Arguments tab of the Run Configuration for the app - the default is the app's project directory.
Exactly where is the auth.conf file within the project directory?
It is the default.
auth.conf is located at \projectdir\conf\auth.conf
I have tried various other locations, none work.
Looks like there is some debugging that can be set. Try adding these options to the VM:
It looks these might cause the full path to be printed for the name of the file that is being looked for.
I assume that the client works fine when run from the command line?
BTW, this discussion highlights one of my pet peeves with most Java developers - complete disregard for end users when writting error messages. Imagine how quickly this problem would have been fixed if the programmer who wrote the com.sun.security.auth.login.ConfigFile class constructor would have bothered to mention the full path name for the auth.conf file!
Actually, one possible workaround is to pass the full path name for the auth.conf file, instead of using a relative path.
I fixed this with your help.
It was a path problem. I had the conf directory under the source directory. It didn't look it was in eclipse but it was.
I agree about bad error messages.
Now you know why I asked where the auth.conf file was located within your project!
This brings up another point: never, ever, under any circumstances trust Eclipse. In its feeble attempts to be helpful it usually does more harm than good. Always verify things from the command line!