4

Using the following panel, I'm able to set a default source folder for new projects.

enter image description here

I'd like to be able to have multiple default source folders created when I create a new project. Is there some particular format for specifying multiple folders? I've tried spaces, semicolons, brackets with no luck. Or, is there another panel for specifying multiple default folders for new projects?

5
  • I guess the answer depends on why you would like to have multiple source folders. The source folder is the folder where eclipse puts a new file when you do New->Class. If you have a good reason to separate your files into two or more folders, consider separating them into multiple java projects. Commented Nov 9, 2014 at 15:30
  • Why does the answer depend on why I need multiple source folder? I use one folder (src/java) for source code. I use another one for resources (src/resource). I manually create the resource src folder after I create a project. This is done for clarity and organization. Multiple projects is not a good solution for my environment. Commented Nov 9, 2014 at 15:36
  • In what aspect are your sources different from your resources? Commented Nov 9, 2014 at 15:39
  • Sources are java files with names like com/java/package/Name.java and are compiled. Resources are files with names like images/Picture.png or audio/Train.wav that are not compiled but simply packaged. This produces artifact separation in packaged applications. Commented Nov 9, 2014 at 15:47
  • I see, this is a good reason to keep them separated. I never had that kind of problem, I only had files that all needed to be compiled. Let's wait and see if someone can do better. Commented Nov 9, 2014 at 15:51

1 Answer 1

3

add source folder

You can add additional source folders in eclipse by right-clicking on a project folder and then going to New > Source Folder.

Also, you can specify folders to be source folders through java build path. More information about that can be found on this SO here.

AFAIK, you cannot set multiple source folders to be generated by default without some sort of plugin.

Sign up to request clarification or add additional context in comments.

1 Comment

As I said, I'd like to have multiple default source folders created when a new project is created ( not manually post project creation ).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.