3.0 FCS: can't step into the JDK [message #165970] |
Sat, 26 June 2004 20:19  |
Eclipse User |
|
|
|
I've just installed 3.0 on a machine which has never had Eclipse before.
I'm debugging the following fragment (with the default settings):
String urlString = ". valid url ."
URL url = new URL(urlString);
HttpURLConnection con = (HttpURLConnection)url.openConnection();
InputStream is = con.getInputStream();
StringBuffer buf = new StringBuffer();
int c;
while((c = is.read()) != -1) {
buf.append((char)c);
}
The code works fine. I press F5 (step into to debug). I do NOT step into
any of the JDK. I do not have Step Filtering turned on (when I drop the Run
menu there is no checkbox associated with "Use Step Filters"). Pressing F5
is no different from pressing F6 - I do not step into any of the JDK methods
shown above. I believe I've tried various settings of the toggle and the
checkboxes from Preferences->Java->Debug->Step Filtering and none appear to
work. What am I doing wrong? I must be missing something obvious!
Thanks,
Russell
|
|
|
|
|
|
Re: 3.0 FCS: can't step into the JDK [message #166120 is a reply to message #165970] |
Tue, 29 June 2004 00:42   |
Eclipse User |
|
|
|
Originally posted by: ed.burnette.REMOVE.THIS.sas.com
When you install the Sun JDK you get two installs, one is the JDK and one is
the JRE. Unfortunately the JRE one (c:\Program files\...) is the one that
gets put in the registry so it's the one Eclipse picks up on, and it has no
sources. Two solutions:
1. Use the -vm argument to eclipse.exe to force it to use javaw.exe from the
JDK, or
2. Inside Eclipse use Window > Preferences > Java > Installed JREs, Click
Add, and teach Eclipse about the name and location of the JDK. For example,
JRE Name: JDK 1.4.2_04
JRE home directory: c:\j2sdk1.4.2_04
Everything else should be filled in for you so press OK.
Then put a check mark next to the new JDK. Press OK again.
Everything should rebuild and you should have full source and javadoc for
the Java run-time libraries.
Some people prefer the first solution (even Eclipse doc recommends it) but I
like the second one for some reason. YMMV. I believe there's a bugzilla
entry open on this to always pick the JDK no matter what the registry says.
--
Ed Burnette, co-author, Eclipse in Action
www.eclipsepowered.org
"Russell Gonsalves" <Russell.Gonsalves@sas.com> wrote in message
news:cbl3p4$kot$1@eclipse.org...
> I've just installed 3.0 on a machine which has never had Eclipse before.
> I'm debugging the following fragment (with the default settings):
>
> String urlString = ". valid url ."
> URL url = new URL(urlString);
> HttpURLConnection con = (HttpURLConnection)url.openConnection();
> InputStream is = con.getInputStream();
> StringBuffer buf = new StringBuffer();
> int c;
> while((c = is.read()) != -1) {
> buf.append((char)c);
> }
>
> The code works fine. I press F5 (step into to debug). I do NOT step into
> any of the JDK. I do not have Step Filtering turned on (when I drop the
Run
> menu there is no checkbox associated with "Use Step Filters"). Pressing
F5
> is no different from pressing F6 - I do not step into any of the JDK
methods
> shown above. I believe I've tried various settings of the toggle and the
> checkboxes from Preferences->Java->Debug->Step Filtering and none appear
to
> work. What am I doing wrong? I must be missing something obvious!
>
> Thanks,
>
> Russell
>
>
|
|
|
Re: 3.0 FCS: can't step into the JDK [message #166238 is a reply to message #166104] |
Tue, 29 June 2004 08:37  |
Eclipse User |
|
|
|
Yes, that was it. I had not told Eclipse about the availability of the SDK
and it got the JRE from the registry. Once I pointed it to the SDK all was
well. It's been so long since I'd installed Eclipse on a machine which
didn't have one that I'd forgotten this step.
Thanks to all who've posted suggestions.
Russell
"Trey Campbell" <nospam_drtrey@midsouth.rr.com> wrote in message
news:cbqasd$h96$1@eclipse.org...
> If the JRE you're using is actually the SDK, Eclipse appears to attach
> the source automatically (at least it did for me). If you're just using
> a JRE, there's no source distributed with it to be attached.
>
> Trey
>
> Russell Gonsalves wrote:
> > Thanks for the response. Excellent question (it'll be about nine hours
> > before I can next get access to the machine). I did not do anything
special
> > to "attach' the sources. Shouldn't Eclipse have prompted me? As I said
> > this is a machine which has never had Eclipse installed before and
minimal
> > changes were made to the default installation to build the "toy"
program.
> >
> > Russell
> >
> > "Eric Bodden" <newsserver_mails@bodden.de> wrote in message
> > news:cbn9io$mtc$1@eclipse.org...
> >
> >>Do you have the appropriate sources attached?
> >>
> >>Eric
> >>
> >>--
> >>Eric Bodden
> >>ICQ UIN: 12656220
> >>Website: http://www.bodden.de
> >>GPG: BB465582
> >
> >
> >
|
|
|
Powered by
FUDForum. Page generated in 0.06710 seconds