|
From: Leif M. <le...@ta...> - 2003-11-29 06:42:26
|
Elhanan,
I am planning to add the ability to set any user directory for the
Wrapper in a future
version. But for now, it is not possible to set the user dir to any
location other than the
location of the Wrapper.exe file. If you really need the user
directory to be in the root
directory, then the only way to do this is to actually place the
Wrapper.exe in the root.
This should work. You will have to modify the startup scripts and any
other related
paths in the wrapper.conf file. It will work however.
Cheers,
Leif
אלחנן מעיין wrote:
> So is there a possibility to use the wrapper from the root instead of
> sub dir bin?
>
> -----Original Message-----
> From: Leif Mortenson [mailto:le...@ta...]
> Sent: Tuesday, November 25, 2003 4:56 PM
> To: Wrapper User List
> Cc: אלחנן מעיין
> Subject: Re: [Wrapper-user] configuring Wrapper to run to java classes
> to run as one service. ..
>
> Elhanan,
> Is this a program that you have written or is it something that you
> are simply trying to
> get integrated with the wrapper. You sent me a lot. I tried looking it
> all over, but may
> have missed something. It sounds like your only remaining problems are
> path related.
>
> One thing that you need to know about how the Wrapper currently
> works is that it
> always sets the current user.dir of the JVM to be the location of the
> Wrapper.exe file.
> All paths are then relative to this location. So if you create a file:
> new File( "tmp/0" )
> then this File object will represent a file called "0", located in a
> directory, "tmp", which
> is located in the current user directory, which is the location of the
> Wrapper.exe file.
> If you really want to accessing the tmp directory in the root, then
> you need to do the
> following: new File( "/tmp/0" )
> This tells Java to start and the root directory, ignoring the current
> user directory.
>
> It is possible to override the default user.dir when the JVM is
> launched by explicitly
> setting the user.dir property as a system property. This can be done
> using the following
> parameter in your wrapper.conf file.
> wrapper.java.additional.1=-Duser.dir=/
>
> The above sets the user dir to the root directory. Note that this
> WILL BREAK all
> relative path handling by the Wrapper and you will need to start
> specifying fully
> qualified paths in your wrapper.conf file. I don't normally suggest
> this, because path
> problems tend to quickly multiply.
>
> If you have access to the source of the compass application, I would
> suggest trying
> to figure out another way to correct those path issues from within the
> application.
> It seems like you should have been having similar problems when running
> from a batch
> file. Did that batch file include and cds or anything to change the
> current directory to
> the root?
>
> Cheers,
> Leif
>
> P.S. Please post to the list rather than to me directly. It helps other
> to learn by making
> your questions and my answers searchable.
>
|