-2

I have a project in the following structure

projectName
    src
       package1
         class1
       package2
         class2

I have enabled build automatically under project tab. It builds projects successfully and creates class files under bin.

If I disable it and do the following, it is not working

 right click on project --> build path --> configure build path --> source tab --> ok

It is not building the project. What I am doing wrongly here?

EDIT

yes, For the comment. I understand that I have to choose project-->build But This is confusing me.

Community
  • 1
  • 1
Gibbs
  • 21,904
  • 13
  • 74
  • 138

2 Answers2

1

Actually, what you want to do is:

On eclipse:

Project --> Build project

Build Project and Build Path are different things.

Basically, Build Project is the compilation of your java files, and Build Path contains all of your source files and all Java libraries that are required to compile the application.

Raphael Amoedo
  • 4,233
  • 4
  • 28
  • 37
  • `java -cp . YourClass` <- This runs your **.class** file. Build the project means compile the code: It generates **.class** for your **.java** files. You do not run the java classes when you compile then. I guess that is your doubt. Am I right? – Raphael Amoedo Jul 08 '15 at 17:39
  • Sorry Man. I know what is build, deployment, pacakging. I have confused with one of the answers in SO. I tried that it is not working. So iI have posted this question – Gibbs Jul 08 '15 at 17:40
  • 2
    Sorry... I didn't get it at first, because your link redirects me to the question, not to the answer. Now I get it but I don't think that works. Sorry for not understanding before. – Raphael Amoedo Jul 08 '15 at 17:46
  • No Problem, Thanks for your time – Gibbs Jul 08 '15 at 17:46
1

click on project --> build automatically (check box) for permanent code changes will build automatically. Else you can go to Project--> clean select your project. It will result clean and build the selected project.

Suresh Kumar
  • 90
  • 1
  • 9