wayneeusa
wayneeusa

Reputation: 194

Intellij import existing resource into package

I'm following a Udemy course that uses Eclipse for Scala. Using Eclipse, he creates a package, then right-clicks on that package, selects Import, then General, then FileSystem and selects an existing resource that he provides in the course.

I'd like to know how to do this in Intellij. I created a package but see no way to import an existing resource into it.

Many thanks.

Upvotes: 1

Views: 76

Answers (1)

CrazyCoder
CrazyCoder

Reputation: 401975

You either configure content root in the existing module or add a new module with the source roots, then make your main module depend on it.

IntelliJ IDEA will not copy the files from some other location, so you have two options:

  • set up a module with the content roots for the existing location with the sources
  • copy files to the existing module source root using your favorite file manager.

Upvotes: 1

Related Questions