Results 1 to 4 of 4
  1. #1
    Rodrigo Braz is offline Member
    Join Date
    Mar 2008
    Posts
    6
    Rep Power
    0

    Default Renaming underlying directory in Java project

    Hi,

    I have a directory with my source and a Java project based on it. How can I rename my directory without having to re-create an entire Java project?

    It seems to me that if I just rename the directory, Eclipse won't know where to find it.

    And renaming it and creating a new project based on the renamed directory forces me to configure all the options I configured before.

    Also, renaming the folder in the Eclipse environment does not actually change the directory's name.

    Thanks,

    Rodrigo

  2. #2
    m3anman is offline Member
    Join Date
    Jan 2009
    Posts
    3
    Rep Power
    0

    Default

    Eclipse does not depend on the root directory of a project, you just need all the correct files and the project settings file. You should have a .classpath, .project files and .metadata folder in your project root directory.

    So long as you have that you should be fine. So simply close the project in Eclipse (make sure not to delete contents!), rename the dir, fire up Eclipse again and then *import* your project instead of creating a new one.

  3. #3
    Rodrigo Braz is offline Member
    Join Date
    Mar 2008
    Posts
    6
    Rep Power
    0

    Default

    Thanks!

    Rodrigo

  4. #4
    Sylar's Avatar
    Sylar is offline Member
    Join Date
    Mar 2009
    Location
    Odessa, Texas
    Posts
    16
    Rep Power
    0

    Default

    Oh. I actually never had problems with directory changes.

    You can simply copy the files(from its old directory) then paste it in the Eclipse package explorer.

Similar Threads

  1. How to create directory through Java Code
    By Java Tip in forum java.io
    Replies: 1
    Last Post: 04-14-2009, 03:34 PM
  2. Renaming a method/variable
    By gapper in forum Eclipse
    Replies: 0
    Last Post: 01-31-2008, 01:29 PM
  3. Renaming a class
    By mew in forum Eclipse
    Replies: 2
    Last Post: 12-06-2007, 11:29 PM
  4. Renaming a class in Eclipse
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-04-2007, 10:54 AM
  5. Replies: 1
    Last Post: 05-19-2007, 11:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •