Hi Alan,

On Mon, Apr 9, 2018 at 5:57 PM, Alan Bateman <alan.bate...@oracle.com>

> On 09/04/2018 16:50, Thomas Stüfe wrote:
>> So, I found that I can attach with jcmd just fine, just the process
>> listing does not work.
>> I can only attach via pid, not via command name, which I think stems from
>> the same error.
>> Does anyone have any idea? Should I open a bug report?
>> Its this something to do with the value of java.io.tmpdir? Are the
> running VMs using their own temp dir?
No, this is a very simple setup.

On my local machine, I build jdk-hs from the current tip. Then I run a
simple java HelloWorld, without any options given. The program just waits
on a keystroke.

$ ../../openjdk/jdk-hs/output-fastdbg/images/jdk/bin/java HelloWorld

I start jcmd from the same image. Again, no options.

$ ./images/jdk/bin/jcmd
248472 jdk.jcmd/sun.tools.jcmd.JCmd

And I only see the jcmd process itself.

Note that in this example I run from cygwin shells, but the same error
happens when running from cmd.exe.

Also note that I also have other java processes running on the same box, eg
an Eclipse instance using openjdk9. It does not show up in the jcmd process
listing either.

I can, however, attach to my HelloWorld process via pid:

$ ./images/jdk/bin/jcmd 248204 help
The following commands are available:

But unsurprisingly not via name:

$ ./images/jdk/bin/jcmd HelloWorld help
Could not find any processes matching : 'HelloWorld'

I am pretty sure this used to work on my machine some time ago.

Thanks, Thomas


Reply via email to