Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 11343
  • Last Modified:

Eclipse problem "This compilation unit is not on the build path of a java project"

I downloaded the Java EE version of the Eclipse IDE, simply be cause I'll be writing JSPs and other EJBs later on.

but first, I wanted to write a simple java program that involves printing out text.

For some strange reasons, I keep on getting the pop up
"This compilation unit is not on the build path of a java project"
every time I press the . key. It seems auto complete is running into some problems that I am not sure how to fix. Can someone teach me how to fix this?

I've defined my own class, and I wrote a test driver for it.

so I have a class like this.
public class testdriver(){
      public testdriver(){
            System.
      }
}

System. gave me that problem already. let alone the custom class that I wrote.

Thanks in advance
0
SamsonChung
Asked:
SamsonChung
  • 2
1 Solution
 
samalrajCommented:
Hi,
ensure that the project *is* a Java project and not just a Project --
Eclipse treats them slightly differently

Regards,
Amal
0
 
SamsonChungAuthor Commented:
Thanks, this just reminds me why I love Gel....
0
 
samalrajCommented:
Welcome :)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now