| Connecting to VM [message #243918] |
Sun, 20 May 2007 14:40  |
Eclipse User |
|
|
|
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 #243984 is a reply to message #243974] |
Wed, 23 May 2007 11:36   |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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 :(
|
|
|
Powered by
FUDForum. Page generated in 0.03271 seconds