This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes The compilation unit is not on the build path.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "The compilation unit is not on the build path.." Watch "The compilation unit is not on the build path.." New topic
Author

The compilation unit is not on the build path..

Marco Castellani
Greenhorn

Joined: Sep 11, 2009
Posts: 3
Hello,

I have a problem in making java compilation with Eclipse for files in a repository I have created under a SVN server. Namely, when I try to type the dot operator in a class I'm writing (under eclipse) I receive the error "The compilation unit is not on the build path of a Java project". The same, also the completed files, that run nicely at command line, in Eclipse seems cannot be executed.

I realized that inside the "src" folder I should see the folder with the JRE, but it is not present in my project. Problem is, how can I add this with Eclipse? I did not managed to find a way to add it !

Thanks in advance, ;-)

Marco
John de Michele
Rancher

Joined: Mar 09, 2009
Posts: 600
Marco:

When you created the project, did you create it as a Java project? Also, the JRE folder should be at the same level as the src folder.

John.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

Welcome to JavaRanch.

This seems to be a problem about Eclipse, so I'll move your question from "Beginning Java" to "IDEs, Version Control and other tools" for you (I can do that because I'm one of the moderators here).

Right-click your project in the Package Explorer (on the left side of the screen) and select Properties. Then click "Java Build Path". There you can add libraries, other projects etc. to Eclipse's build path for your project.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Marco Castellani
Greenhorn

Joined: Sep 11, 2009
Posts: 3
John de Michele wrote:Marco:

When you created the project, did you create it as a Java project? Also, the JRE folder should be at the same level as the src folder.

John.


Well, I created a local copy of the existing remote repository, selecting "Checkout project from SVN" under "File > New > Other".. don't know how to say Eclipse that it's in fact a JAVA project..

Marco
Marco Castellani
Greenhorn

Joined: Sep 11, 2009
Posts: 3
Jesper Young wrote:Welcome to JavaRanch.

This seems to be a problem about Eclipse, so I'll move your question from "Beginning Java" to "IDEs, Version Control and other tools" for you (I can do that because I'm one of the moderators here).

Right-click your project in the Package Explorer (on the left side of the screen) and select Properties. Then click "Java Build Path". There you can add libraries, other projects etc. to Eclipse's build path for your project.


Thanks for the welcome ;-)

Problem is, on the Properties for my project, it does NOT appear "Java buld Path" at all...

Marco
John de Michele
Rancher

Joined: Mar 09, 2009
Posts: 600
Marco:

I think I may know what the issue is. When you go to the SVN Repositories Perspective, open the project you want to check out, and right click on the trunk folder. There should be an option that says 'Find/Check out as...'. That will allow you to check out your project as a Java project.

John.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: The compilation unit is not on the build path..
 
Similar Threads
Eclipse: Can't add new package
problem in mapping hibernate class
Dynamic Web project with multiple Java projects
Managing multi-module maven project inside Eclipse
Trying to deploy an web application on tomcat 6 and getting following error: