Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-29-2007, 02:35 AM
Member
 
Join Date: Dec 2007
Posts: 17
feniger is on a distinguished road
Tracing
I have a logical bug, I mean my code compiles and runs without errors,
only it doesnt do what I wanted it to.
I remember when I programmed in prolog I could trace the code - one command at a time, and figure out where my bug is,
can I do the same in java? using eclipse.
__________________
have a good one - Day I mean...
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-29-2007, 02:38 AM
Senior Member
 
Join Date: Jun 2007
Location: Bali, ID
Posts: 100
wsaryada is on a distinguished road
Sure you can do it in Eclipse. You can run you application a debug mode. You debug a simple java application or even a web application if you want.
__________________
Website:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
- Blog:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 12-29-2007, 02:45 AM
Member
 
Join Date: Dec 2007
Posts: 17
feniger is on a distinguished road
trace
excuse my ignorancy, how do I do that?
__________________
have a good one - Day I mean...
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 12-29-2007, 03:37 AM
Senior Member
 
Join Date: Jun 2007
Location: Bali, ID
Posts: 100
wsaryada is on a distinguished road
If you work java appplication, from the Run menu you can select the Debug menu. Or right click in the text editor and select Debug As... Java Application.
__________________
Website:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
- Blog:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 12-29-2007, 10:32 AM
tim's Avatar
tim tim is offline
Senior Member
 
Join Date: Dec 2007
Location: South Africa
Posts: 334
tim is on a distinguished road
Tracing
Hello feniger

Try looking in the program's menus for a "step in" or "step over" command and remember its shortcut key. If you use "step in" the debugger will run into each method it encounters, while "step over" will run the method and continue to the next line of code. Most IDEs have this functionality. You must be in debug mode though.

It is also useful to use break points in your program. The program will execute normally while you are in debug mode and when it encounters a break point, it will stop and then you can take a look at your variables by using adding watch.

I have never used eclipse, but I think it should, at least, have these debugging features available. If it does not, consider using Netbeans.
__________________
If your ship has not come in yet then build a lighthouse.
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 12-29-2007, 02:08 PM
Member
 
Join Date: Dec 2007
Posts: 17
feniger is on a distinguished road
I should probably use netbeans... its got more tutorials anyway...
__________________
have a good one - Day I mean...
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 12-29-2007, 05:19 PM
Member
 
Join Date: Nov 2007
Posts: 17
dubdubdub has a little shameless behaviour in the past
is eclipse or some other program free?
Sorry to sound so cheap,
Maybe I should go and buy Borland if I want too take java seriously.
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 12-29-2007, 08:43 PM
Member
 
Join Date: Dec 2007
Posts: 17
feniger is on a distinguished road
both java and eclipse are great AND free...
you should probably search around for information about Java to take it more seriously...
__________________
have a good one - Day I mean...
Bookmark Post in Technorati
Reply With Quote
  #9 (permalink)  
Old 12-29-2007, 10:17 PM
Member
 
Join Date: Nov 2007
Posts: 17
dubdubdub has a little shameless behaviour in the past
Thank you for your speedy reply feniger
Is this any better than Netbeans I see they are about the same size to download (well sort of) and I am downloading Netbeans6 at the moment just 6 more hours to go (50% so far).

From Eric
Bookmark Post in Technorati
Reply With Quote
  #10 (permalink)  
Old 12-29-2007, 10:42 PM
Member
 
Join Date: Dec 2007
Posts: 17
feniger is on a distinguished road
I'd recommand you finish downloading netbeans, and learn through that cause its a more popular IDE.
I use eclipse because I got used to it before I knew about netbeans,
now I dont have time and will to switch.
__________________
have a good one - Day I mean...
Bookmark Post in Technorati
Reply With Quote
  #11 (permalink)  
Old 12-30-2007, 03:25 AM
Member
 
Join Date: Nov 2007
Posts: 17
dubdubdub has a little shameless behaviour in the past
OK I have just taken my "Moderator friendly" pill and now I am very happy & over the moon.


I just spent all morning downloading Netbeans6 all (98 Meg of it) and I go to install and it says I need JDK 1.5.0_06 I must of had a older version (and that means another big down load) almost as big as the other file what a ............... [opps I feel the pill wearing off I must go]



---- more ----
I just found out there is a smaller download called jGRASP program
jGRASP Home Page

Last edited by dubdubdub : 12-30-2007 at 04:04 AM. Reason: more information
Bookmark Post in Technorati
Reply With Quote
  #12 (permalink)  
Old 12-30-2007, 11:36 AM
CaptainMorgan's Avatar
Moderator
 
Join Date: Dec 2007
Location: NewEngland, US
Posts: 840
CaptainMorgan will become famous soon enoughCaptainMorgan will become famous soon enough
Send a message via AIM to CaptainMorgan
Quote:
Originally Posted by dubdubdub View Post
is eclipse or some other program free?
Sorry to sound so cheap,
Maybe I should go and buy Borland if I want too take java seriously.
FREE! Oh, and if you want to do serious coding in java, use Netbeans.

EDIT: Oh, good, I see you got Netbeans... you can find the Netbeans 6.0/JDK bundle on Suns site for more convenience.
Bookmark Post in Technorati
Reply With Quote
  #13 (permalink)  
Old 01-04-2008, 08:42 PM
Member
 
Join Date: Dec 2007
Posts: 17
feniger is on a distinguished road
Quote:
Originally Posted by CaptainMorgan View Post
FREE! Oh, and if you want to do serious coding in java, use Netbeans.

CaptainMorgan,
is there a concrete reason why NetBeans is more professional than eclipse?
at first glimpse they look very similar,
whats your opinion about it and what is unique in NetBeans?
__________________
have a good one - Day I mean...
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +3. The time now is 12:24 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org