• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

Java Module

 
Greenhorn
Posts: 4
  • 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: 72048
312
  • 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.
 
Saloon Keeper
Posts: 325
42
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: 22080
113
Eclipse IDE Spring VI Editor Chrome Java Ubuntu 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: 4
  • 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: 4
  • 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]
 
Jj Roberts
Saloon Keeper
Posts: 325
42
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.
 
Thank you my well lotioned goddess! Here, have my favorite tiny ad!
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic