how to specify source folders in a java project from a SVN checkout

Posted on 2007-08-01
Last Modified: 2013-12-15
After installing subclipse on a new eclipse (europa) installation, I proceeded to checkout the trunk from the svn repository.  This contains many folders under trunk, each folder being a separate project.   Upon checkout, the trunk (and the rest) were under the workspace folder

Assume that one of the project folders is called project1.. So locally, it is under workspace\trunk\project1

How do I create a Java project that only pertains to project1 files and resources (and will let me commit etc) ?  When I tried to do this and specified this folder, it complained that the project must be directly under the workspace folder (which it is obviously cannot).
Question by:nsriram
    LVL 4

    Expert Comment

    1. Goto FILE > Project

    2. Select java project

    3. In the Content box, select "Create project from existing source"

    4. Browse to your project folder checked out from SVN.


    Author Comment

    "Projects located in the workspace folder must be direct sub folders of the workspace folder" says eclipse when I try to browse to the relevant folder.

    Obviously had I just checked out the relevant project into the workspace, this problem doesnt happen as the project1 is directly under workspace folder.  So I imagine this means that one has to check out each project individually instead of checking out a trunk superfolder that has multiple project folders.
    LVL 2

    Accepted Solution

    First you need to open 'SVN Repository Exploring Perspective' using "Select Perspective" dialog window. Now after doing that, add new "Repository Location". You can now browse whole repository and can check out whatever you require from repository. It could be trunk itself of subproject under that trunk.

    Following doc of snapshots might help you in this regard:

    Author Comment

    yaxh:  Your suggestion involves checking out a single project to the workspace. Eclipse likes this because that project is directly under workspace. However suppose one (for whatever reason) checked out trunk itself, then the relevant project folders are one level deeper in the workspace (and under svn control).  It appears that Eclipse doesnt like this (as its "idea" of a project in workspace maps on to a folder directly below workspace).  In any case, I am accepting your solution (what I did was just to follow what eclipse liked, check one project out at a time).
    LVL 2

    Expert Comment

    nsriram: One more thing you can do here.

    1. Create a local project using project wizard.
    2. Import source from the sup-projects under the trunk which you have already checked out. The import allows you to get any source from  local file system, or even shared network too.

    The problem here (may be it's just me) is when I do any SVN action, it complains about some missing "tmp" directory. So, what i did was I manually (out side of eclipse) copied (after import) actual source from sub-project (overridden the imported one) under trunk to locally created project. Then I went to eclipse and refreshed the project which i have created. Now it lets me do anything which I wanted to.


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    GIT and storing DBs 7 116
    Git Repository Strategy 5 63
    Java eclipse error 2 60
    Unable to start eclipse ? 17 48
    Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
    How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from ( Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…
    The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
    The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now