elliptic00
elliptic00

Reputation: 447

Add external java files(*.java file, not a jar file) to project in Intellij

I have many java files on one directory and I want to use it in my Intellij project. But I don't want to copy the java files to my project each time when I start a new project.

I know I can use reference in Visual Studio and Xcode. I'm wondering whether I can do it in Intellij(14 CE)

Upvotes: 3

Views: 967

Answers (1)

Ben Rowland
Ben Rowland

Reputation: 361

Project Structure -> Modules -> Add Content Root -> (select directory containing external source files).

IntelliJ should detect the content as a Source Folder. If it doesn't detect it correctly, you can select it in the right-hand-side of Project Structure, and Mark as: (Sources).

Upvotes: 4

Related Questions