Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Connecting to VM
Connecting to VM [message #243918] Sun, 20 May 2007 14:40 Go to next message
Eclipse UserFriend
Originally posted by: eclipse.garydjones.mailshell.com

Hi, first of all sorry if this is off-topic, but I'm hoping there are some
people here who have the knowledge I need.

I am using Eclipse to develop and debug some software, and wish the
software I am developing to also connect to the JVM (the reason is
unimportant). The problem is that Eclipse is already connected, so
debugging isn't possible via sockets. Is there another way I can either
(preferably) have my code connect to the VM or (alternatively) get Eclipse
to use another way?

Many thanks.
Re: Connecting to VM [message #243929 is a reply to message #243918] Tue, 22 May 2007 01:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.garydjones.mailshell.com

What, nobody? :-(
Re: Connecting to VM [message #243944 is a reply to message #243929] Tue, 22 May 2007 12:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"Gary" <eclipse@garydjones.mailshell.com> wrote in message
news:152b4a3c8502dcee07b5e22e6990e572$1@www.eclipse.org...
> What, nobody? :-(

I tried a few times to formulate a response but kept getting stymied by not
understanding exactly what you're trying to do; the details as provided
didn't quite make sense. I was waiting for someone smarter than me to
respond, but perhaps others are similarly stymied.

Can you provide a bit more detail? E.g., explain what all the VMs in the
picture are (there's the Eclipse VM, the VM running the target code.... is
there a third VM as well?), what behavior you would expect from multiple
clients attaching to the same VM at the same time, etc.
Re: Connecting to VM [message #243974 is a reply to message #243944] Wed, 23 May 2007 09:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.garydjones.mailshell.com

Hi,

Thanks for the response, however confused you might be :)

Essentially what I am trying to do is debug some code which uses
Javassist's HotSwapper (see
http://www.csg.is.titech.ac.jp/~chiba/javassist/html/javassi st/util/HotSwapper.html
which probably explains better than I can). The author told me that
"Javassist's HotSwapper uses the debugger interface of the JVM as Eclipse
JDT does. So they cannot coexist." I don't mind modifying HotSwapper to
use some other method of communication, but this is the first time I've
dipped my toes into this area, and in fact that might be why my original
post was not clear. Looking at the Sun docs maybe I could rewrite to use
Shared Memory instead (
http://java.sun.com/j2se/1.4.2/docs/guide/jpda/conninv.html or is that
completely the wrong thing?)? Is there a good tutorial online around this
area somewhere?

Thanks,
G
Re: Connecting to VM [message #243984 is a reply to message #243974] Wed, 23 May 2007 11:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"Gary" <eclipse@garydjones.mailshell.com> wrote in message
news:498f877e1c57d264eaa84437e752a6b4$1@www.eclipse.org...
> Hi,
>
> Thanks for the response, however confused you might be :)
>
> Essentially what I am trying to do is debug some code which uses
> Javassist's HotSwapper (see
> http://www.csg.is.titech.ac.jp/~chiba/javassist/html/javassi st/util/HotSwapper.html
> which probably explains better than I can). The author told me that
> "Javassist's HotSwapper uses the debugger interface of the JVM as Eclipse
> JDT does. So they cannot coexist." I don't mind modifying HotSwapper to
> use some other method of communication, but this is the first time I've
> dipped my toes into this area, and in fact that might be why my original
> post was not clear. Looking at the Sun docs maybe I could rewrite to use
> Shared Memory instead (
> http://java.sun.com/j2se/1.4.2/docs/guide/jpda/conninv.html or is that
> completely the wrong thing?)? Is there a good tutorial online around this
> area somewhere?


Hmm. Yes, mixing HotSwapper with anything else doesn't sound like it's
likely to lower your overall level of pain. In all seriousness, have you
considered the possibility that you are confusing your code with your data?
Hot-swapping is a debug feature rather than a Java language feature, and
that is in part because it is unreliable and not guaranteed to be present
for any particular VM. If you absolutely have to change class definitions
in running code, perhaps it is an issue of using a custom classloader and
carefully managing your object references?

Anyway, good luck...
Re: Connecting to VM [message #243998 is a reply to message #243984] Wed, 23 May 2007 12:57 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse.garydjones.mailshell.com

> Hot-swapping is a debug feature rather than a Java language feature, and
> that is in part because it is unreliable and not guaranteed to be present
> for any particular VM.

For sure. But it is development & debugging that I want it for, not for
production code.

> If you absolutely have to change class definitions
> in running code, perhaps it is an issue of using a custom classloader and
> carefully managing your object references?

I looked into this before I considered Jaassist, and couldn't work out how
to make it work :(
Previous Topic:Question about creating an IFile instance
Next Topic:Extending ECJ using the interfaces in JSR 199
Goto Forum:
  


Current Time: Sun Nov 09 17:19:40 EST 2025

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

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

Back to the top