• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java Module

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have created a project, Inside the Project, there One source folder, have taken name as feeding, created packages, classes, module-info.java file into it. After Then, Another source folder created,  have taken name as care, created packages, classes, But while creating module-info.java into care folder facing issue duplicate module-info.java
 
Marshal
Posts: 79277
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't know much about modules, but please search for all module‑info files and tell us how many you found.
 
Bartender
Posts: 390
47
Firefox Browser MySQL Database Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, can you show us what your directory structure looks like?
For example:(While pictures aren't the easiest thing to work with a picture of your project in an IDE could also work)
 
Sheriff
Posts: 22784
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Each Java module may only have one module-info.java file. Although you have two source folders, they still form one module. You instead need to create two separate modules. I haven't created any non-Maven modules, so I can't tell you how to do this in a non-Maven project. Maybe you even can't and you need to create two separate projects.
 
Er Rahul Raj
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Jj Roberts, You have shared the directory structure the same as I have created in STS.
 
Er Rahul Raj
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Jj Roberts, I am sharing a screenshot of the project, Here, If I am trying to add module-info.java file then the project getting elapsed means project even not opening, trying to open in type hierarchy then showing Duplicate module-info.java. Please have a concern.
java_module.jpg
[Thumbnail for java_module.jpg]
 
Jesse Duncan
Bartender
Posts: 390
47
Firefox Browser MySQL Database Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry it has taken me so long to get back to this.

I'm not sure what you are referring to by STS, but it looks like you are using Eclipse. Eclipse requires you to create a new project for each module. It is possible to create a nested project in Eclipse, where you would have a parent project containing all of your module projects, but I doubt you need that. IntelliJ and Netbeans do allow multi-module projects.
 
Ranch Hand
Posts: 140
4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm thinking STS = Spring Tool Suite, which is built on Eclipse.
reply
    Bookmark Topic Watch Topic
  • New Topic