2

i know intellij supports java9,and i know how to set classpath on intellij by adding libraries to build path.

but how does it works in java 9, is there a section for module path in intellij?

i think java 9 uses classpath if it cannot find classes on module path. so should both classpath and module-path exist on intellij settings ?

and one last question, when i add a jar to libraries(java8 jar), is it an unnamed module or when it will be a automatic module?

darcula
  • 33
  • 4
  • It's just a matter of installing and opening IntelliJ project settings, isn't it? When you add a jar depending on *where it is resolved*, on modulepath or the classpath its either treated as automatic or unnamed respectively. – Naman Apr 08 '18 at 11:40
  • no it is not. if it was i wouldnot asking that question. isn't it ? – darcula Dec 16 '20 at 09:06

1 Answers1

2

IDEA currently uses a heuristic to decide wheather or not to put the whole project on the module path, see How to run Java 9 application with classpath rather than module path in IDEA? for details

Marcus
  • 8,601
  • 4
  • 24
  • 24