Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Cannot connect to VM error in Java debugger
Cannot connect to VM error in Java debugger [message #247170] Fri, 31 August 2007 16:20 Go to next message
Eclipse UserFriend
Originally posted by: billmcn.gmail.com

I am running Eclipse 3.2 on Ubuntu 7.04. I created a simple hello world
Java program by following the steps in the Eclipse HelloWorld tutorial.
The program builds and runs. When I try to debug it, I get a "Cannot
connect to VM" error. I see multiple mentions of this error on various
newsgroups, but it's not clear to me if the suggestions I've seen apply to
my machine.

Here are the details:
1) After verifying my program works without the debugger, I put a
breakpoint on the println statement in the main function.
2) From the Eclipse menu, I select Run->Debug... and press the Debug
button on the dialog that appears.
3) "Hello, World" is printed to the console immediately.
4) Several seconds later I see a dialog box entitled "Launching" with the
error message "Cannot connect to VM". This dialog has a Details button
that is grayed out.

I see the same behavior if I don't set a breakpoint in step (1).

This is a local debugging task. I'm not trying to debug anything
remotely. I also have localhost set up in my /etc/hosts file, and
networking is set up properly.

I find this particularly confusing because steps (3) and (4) make it seem
like a regular non-debugged process is being launched, and the debugger
fails to connect because it has already closed.

Any suggestions?
Re: Cannot connect to VM error in Java debugger [message #247194 is a reply to message #247170] Fri, 31 August 2007 18:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: billmcn.gmail.com

I am able to use jdb to debug my HelloWorld app from the command line.
Re: Cannot connect to VM error in Java debugger [message #247202 is a reply to message #247170] Sun, 02 September 2007 13:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: thunderaxiom.gmail.com

Bill McNeill skrev den 31-08-2007 22:20:

> remotely. I also have localhost set up in my /etc/hosts file, and
> networking is set up properly.

Do your Ubuntu have the firewall enabled? If so, the network connection
needed between eclipse and your program may be denied.

--
Thorbjørn
Re: Cannot connect to VM error in Java debugger [message #247540 is a reply to message #247202] Thu, 06 September 2007 16:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: billmcn.gmail.com

I don't have the firewall enabled. Ubuntu has the firewall turned off by
default and I am using a default Ubuntu setup.

After a bit more poking around I managed to fix this problem. I don't
remember exactly what I did because I was randomly trying stuff, but I
think the crux of it was that I deleted my workspace folder and started
over. Not satisfying since I don't understand what was originally wrong,
but at least the debugger works now.
Re: Cannot connect to VM error in Java debugger [message #247721 is a reply to message #247540] Mon, 10 September 2007 10:42 Go to previous message
Eclipse UserFriend
Can you try Eclipse 3.3 to see if the problem still exists?

Darin

"Bill McNeill" <billmcn@gmail.com> wrote in message
news:1edb64dba692b7e2988b989164b71204$1@www.eclipse.org...
>I don't have the firewall enabled. Ubuntu has the firewall turned off by
>default and I am using a default Ubuntu setup.
>
> After a bit more poking around I managed to fix this problem. I don't
> remember exactly what I did because I was randomly trying stuff, but I
> think the crux of it was that I deleted my workspace folder and started
> over. Not satisfying since I don't understand what was originally wrong,
> but at least the debugger works now.
>
>
Previous Topic:F3 key no more working
Next Topic:JDT: Code cleanup, final keyword, cannot disable
Goto Forum:
  


Current Time: Wed Jul 16 12:40:07 EDT 2025

Powered by FUDForum. Page generated in 0.24956 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top