• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

The compilation unit is not on the build path..

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 600
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic