Re: tomcat and the working directory
- From: "ian ward" <iandavidward@xxxxxxxxxxx>
- Date: 25 Jun 2005 09:04:42 -0700
Raymond DeCampo a écrit :
> ian ward wrote:
> >
> > ian ward a écrit :
> >
> >>I've seen several old threads speaking about Tomcat and the working
> >>directory but I haven't seen how this may be set. I believe I need to
> >>do this so that some dlls I am using, which are invoked via jni from my
> >>java/web app, can talk to each other. I can get them going but that's
> >>it. At the moment these dlls are in myapp\WEB-INF\lib, which I assume
> >>is tomcat's java.library.path, otherwise system.loadlibrary can't find
> >>them in the first place.
> >>
> >>I have experimented a bit but I think it might be some time before I
> >>hit on it. If I am barking up the wrong tree then I'd appreciate being
> >>gently informed and, well, what do I need to do to keep these dlls
> >>happy?
> >>
> >>Thanks
> >>Ian
> >
> >
> > I think I can set this using System.setProperty("user.dir",<the right
> > folder>) but at the moment I am putting this in one of my jsp pages and
> > I'm not convinced that that will work. How can I be sure that I have
> > set it so that it provides the reference for my dlls? Does it need to
> > go in the java class(es) which invoke(s) the dlls?
> >
>
> You are confusing the concepts of the working directory and the user's
> home directory. The working directory is the directory the Java process
> was started in. As far as I know, there is no way in Java to change the
> working directory once the process starts (although JNI calls could
> probably do it).
>
> HTH,
> Ray
>
> --
> XML is the programmer's duct tape.
This is good news (my confusion) as it hasn't been getting me anywhere.
The other good news is that I don't want to change the working
directory once the java process has started, I just want it to be right
in the first place - I only made the suggestion about doing it within
java as I assumed (wrongly) that I had the right thing and that I just
needed to find the right place/moment to set it.
The (temporary, I hope) bad news is that you haven't told me how I do
set the working directory. I assume I'm looking for some sort of
environment variable (which one?) and the right place to set it
(whether inside or outside tomcat).
You're not allowed to have a proper weekend until you've told me this!
Many thanks in the meantime
PS I've discovered that my comments about the java.library.path and
tomcat are are bit out but I think I've got that covered now.
.
- Follow-Ups:
- Re: tomcat and the working directory
- From: Chris Smith
- Re: tomcat and the working directory
- References:
- tomcat and the working directory
- From: ian ward
- Re: tomcat and the working directory
- From: ian ward
- Re: tomcat and the working directory
- From: Raymond DeCampo
- tomcat and the working directory
- Prev by Date: Re: Strange problem with using getRuntime.exec() in Frames
- Next by Date: J2ME: MIDP 2.0 environments
- Previous by thread: Re: tomcat and the working directory
- Next by thread: Re: tomcat and the working directory
- Index(es):
Relevant Pages
|
|