visualvm cannot see a java process launched from cygwin

I had the same problem. The vm was not shown automatically but I was able to connect via "Add JMX Connection", using hostname and jmx.remote.port...

On VisualVM go to File -> Add JMX Connection

localhost:3333

Add vm parameter at startup e.g.:

 -Dcom.sun.management.jmxremote.port=3333
 -Dcom.sun.management.jmxremote.ssl=false
 -Dcom.sun.management.jmxremote.authenticate=false

I fixed the problem by running VisualVM from within Cygwin. If you prefer not to profile using a remote JMX connection, you can run both VisualVM and your Java program using Cygwin:

Open the Cygwin Console window, navigate to visual_vm.exe and run that file from within the Cygwin environment.