Results 1 to 8 of 8
- 01-29-2015, 02:36 AM #1
Member
- Join Date
- Jan 2015
- Posts
- 1
- Rep Power
- 0
Error when trying to step into my code using F7 in NetBeans v8.0.2
I am writing a program for a self taught Java class. The program uses a class I wrote for a previous assignment. The program is a variation of Blackjack, but instead of cards it uses two six sided dice. The previous class is called Die.class and the new program is called TwentyOne.class. When I press F7 to step into the code I get an error message that says: Source path java\lang\Boolean not found. The reason is likely no open project with this source file. When I press F7 the second time I get the same message, but the path is: sun\misc\launcher.java, and the third time I press F7 the path is changed to: twentyone\TwentyOne.java.
Can someone shed some light on why this is happening? I need to step through the code to work out some problems with my code. http://www.java-forums.org/images/smilies/skype/@.gif
I have also tried running the program with JGrasp v 2.0.1_01. I get a return code of 0, but nothing happens. JGrasp doesn't have step through option.
Thanks in advance for any help.
Lord Byron
- 01-29-2015, 05:03 AM #2
Senior Member
- Join Date
- Jan 2013
- Location
- Northern Virginia, United States
- Posts
- 6,226
- Rep Power
- 15
Re: Error when trying to step into my code using F7 in NetBeans v8.0.2
I use Eclipse as my IDE but I think I know what the problem is. You probably don't have the source code to the JDK classes so you can't step into the java.lang.Boolean class or other classes. Does pressing F7 continuously eventually get you back to your own code? If so, that should be sufficient since I doubt the internals of the JDK class libraries are where your coding problems exist.
Regards,
JimLast edited by jim829; 01-29-2015 at 05:13 AM.
The JavaTM Tutorials | SSCCE | Java Naming Conventions
Poor planning on your part does not constitute an emergency on my part
- 01-29-2015, 06:28 AM #3
Re: Error when trying to step into my code using F7 in NetBeans v8.0.2
Moved from New to Java to NetBeans
dbIf you're forever cleaning cobwebs, it's time to get rid of the spiders.
- 01-29-2015, 11:19 AM #4
Just a guy
- Join Date
- Jun 2013
- Location
- Netherlands
- Posts
- 5,114
- Rep Power
- 13
Re: Error when trying to step into my code using F7 in NetBeans v8.0.2
The main problem here is to learn to not to rely only on F7, which is "step into". Debugging is a dance of sometimes taking a "step over" and other times doing a "step into". You want to step over methods of standard JDK classes, its only your own code you're interested in.
"Syntactic sugar causes cancer of the semicolon." -- Alan Perlis
- 01-29-2015, 02:00 PM #5
- 01-29-2015, 02:13 PM #6
Just a guy
- Join Date
- Jun 2013
- Location
- Netherlands
- Posts
- 5,114
- Rep Power
- 13
Re: Error when trying to step into my code using F7 in NetBeans v8.0.2
Now I wonder if Eclipse has something similar, quite useful.
EDIT: yes it does.
window -> preferences -> java -> debug -> step filteringLast edited by gimbal2; 01-29-2015 at 02:46 PM.
"Syntactic sugar causes cancer of the semicolon." -- Alan Perlis
- 01-29-2015, 05:03 PM #7
Senior Member
- Join Date
- Jan 2013
- Location
- Northern Virginia, United States
- Posts
- 6,226
- Rep Power
- 15
Re: Error when trying to step into my code using F7 in NetBeans v8.0.2
The JavaTM Tutorials | SSCCE | Java Naming Conventions
Poor planning on your part does not constitute an emergency on my part
- 01-29-2015, 05:21 PM #8
Just a guy
- Join Date
- Jun 2013
- Location
- Netherlands
- Posts
- 5,114
- Rep Power
- 13
Re: Error when trying to step into my code using F7 in NetBeans v8.0.2
I find the "filter simple getters/setters" checkboxes the most useful to be honest. I mean normally when you have code like this:
Java Code:doSomeEpicThing(object.getProperty1(), object.getProperty2());
Its the small things that end up being the biggest joys.Last edited by gimbal2; 01-29-2015 at 05:28 PM.
"Syntactic sugar causes cancer of the semicolon." -- Alan Perlis
Similar Threads
-
Installing WebSphere Application Server step by step
By manideep.d132 in forum Reviews / AdvertisingReplies: 0Last Post: 01-23-2012, 08:35 PM -
how to operate a graph step by step clicking the jbutton?
By cibip in forum New To JavaReplies: 1Last Post: 08-18-2011, 08:47 PM -
NetBeans - error in code?
By Sparky in forum NetBeansReplies: 4Last Post: 02-03-2011, 03:51 AM -
EJB3 Message driven beans step-by-step guide
By nix123456 in forum Enterprise JavaBeans (EJB)Replies: 3Last Post: 09-28-2009, 02:29 PM -
Step-by-Step Tutorial: Achieve RAD with Seam+Eclipse+Tomcat
By Techieexchange in forum JavaServer Faces (JSF)Replies: 0Last Post: 11-13-2007, 08:13 PM
Bookmarks