Karen,
This is the way that the pkg(1) command is designed. There is a -R
option to the command for providing the location of the image. If -R is
not specified, then it uses the current working directory as the
default. The pkg command never uses the location of the executable to
find the image.
Cheers,
Tom
Karen Ho wrote:
>
> Hi,
>
>
>
> Please kindly help to verify if this is a bug or a feature(?) for the
> pkg command:
>
>
>
> If you directly run the pkg command (e.g. pkg list -a) in the bin
> directory (refer to example 1 below), it will be run successfully.
> However, if you try to run the same pkg command outside the glassfish
> directory (refer to example 2 below), it will prompt an error message
> saying that "pkg: No image found." It looks like that the pkg command
> will look up the application image from current execution folder
> instead of the path where the pkg command located. Is it a bug?
> Please clarify.
>
>
>
> Example 1
>
> =================================
>
> C:\dev\glassfishv3\bin>pkg list -a
>
> NAME (AUTHORITY) VERSION
> STATE UFIX
>
> felix 1.2.2-0
> installed ----
>
> glassfish-amx 3.0-44
> installed ----
>
> glassfish-api 3.0-44
> installed ----
>
> glassfish-appclient 3.0-44
> installed ----
>
> ...
>
>
>
>
>
> Example 2
>
> =================================
>
> D:\somewhere>C:\dev\glassfishv3\bin\pkg list -a
>
> pkg: No image found.
>
>
>
>
>
> Thanks & Regards,
>
> Karen
>