| Author |
How to run a project on Eclipse
|
Gary Ba
Ranch Hand
Joined: Oct 23, 2009
Posts: 150
|
|
Hi,
I have just recently downloaded Eclipse on windows XP. I also grabbed a program online and used Eclipse to debug it. That worked fine until I started making code changes.
I changed the class name and for some reason I cannot run/debug the project anymore. Does anyone know what I need to set to run/debug on Eclipse - Helios. Please help.
Thank you,
Garry
|
star chaser..
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14670
|
|
|
Is it a standalone application ? What is your main class ? Right-click on it, select Run As..., Java Application.
|
[My Blog]
All roads lead to JavaRanch
|
 |
Tom Reilly
Rancher
Joined: Jun 01, 2010
Posts: 618
|
|
|
Are you getting a compiler error? A runtime error? What happens if you change the class name back to the original name? Did you change a public class name? If so, did you rename the file that contains it? They must be the same.
|
 |
Gary Ba
Ranch Hand
Joined: Oct 23, 2009
Posts: 150
|
|
I copied and paste the old files with the old file and class names. Opened those files from Eclipse and it worked.
If I used the new files with the new names, it ask me to Run As Ant Build... or Ant Build. I selected one of them but nothing happens.
I am not getting a compile error. It is set up to 'build automatically'.
I tried to right where the main method is but the option "Run As.. Java Application" is not available.
Garry
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14670
|
|
Gary Ba wrote:Opened those files from Eclipse and it worked.
Did you create a new Java Project ? You need to create a Java project first, and import your files using File/Import.
|
 |
Gary Ba
Ranch Hand
Joined: Oct 23, 2009
Posts: 150
|
|
Oh ok. I finally got it right! I had to create a project. Dough! Completely forgot about it...
Thank you guys,
Gary
|
 |
 |
|
|
subject: How to run a project on Eclipse
|
|
|