Can somebody give me any comments about this problem?

I would like to report a bug in jira for it if somebody can verify this
bug.


Sky Ao


=============================

On Tue, May 17, 2011 at 11:28 PM, Xiaojian Ao <[email protected]> wrote:

> Hi
>
>      I found that the current directory is error  in the windows bin script
> generated by application plugin.
>
>      The generated application layout will be like this:
>
> app
>     + bin
>         + app.bat
>         + app
>     + lib
>
>     When we execute the script to start application, we always in the bin
> directory or other directory. So normally we
> will use command like "cd path-to-bin/.." to cd the root of project and
> then execute java.exe to start this
> application.
>
>     Only when the project root directory is the same as the "current
> directory", we can safely use
> related path in our java code. Like reading config file "conf/logback.xml".
>
>     In the script for unix, there is some lines to cd to the ''..'
> directory.
>
> SAVED="`pwd`"
> cd "`dirname \"$PRG\"`/.."
> APP_HOME="`pwd -P`"
> cd "$SAVED"
>
>    But in the script for windows, there is no command to cd to "..". So
> when we start the application,
> the current directory is "app/bin" or other directory, not "app" we
> expected. It cause my application failure
> to read files by related path.
>
>     I think this should be a bug in the script for windows.We need add a
> command to "cd path-to-bin/.." like we do
> in unix script.
>
> Sky Ao
>

Reply via email to