This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

How to run a project on Eclipse

 
Ranch Hand
Posts: 161
Firefox Browser Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it a standalone application ? What is your main class ? Right-click on it, select Run As..., Java Application.
 
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 161
Firefox Browser Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 161
Firefox Browser Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh ok. I finally got it right! I had to create a project. Dough! Completely forgot about it...

Thank you guys,
Gary
 
You firghten me terribly. I would like to go home now. Here, take this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic