Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

The compilation unit is not on the build path..

 
Marco Castellani
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 600
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15284
39
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Marco Castellani
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 600
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic