• 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
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Instruct Wildfly to run an application as a modular application (Java 9 modules)

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using:

  • Wildfly 21
  • Java 11

  • I've just went through the pain of modularizing (with Java 9 modules) an Jakarta EE EAR application of mine that runs on Wildfly 21. This application has a war jar, ejb jars, utility jars (all have a module-info.java now) and other third party libraries. The whole application compiles well, without errors.

    But I noticed that when I run it in Wildfly, althought it runs without problems as before when it wasn't modular, it seems that the application server is not considering that it is now a modular application and is not using the module path to run the application, but the class path. So, at runtime, the modular nature of the application is being ignored.

    Is there a way to instruct the application server to run the application as a modular one, using the modulepath instead of the classpath?

    It's a pity that we have to be locked by application servers like Wildfly blocking us from using such an important Java feature (modules) at runtime in our applications.

    Cross-posted: https://stackoverflow.com/questions/66178238/instruct-wildfly-to-run-an-application-as-a-modular-application-java-9-modules
     
    Bartender
    Posts: 331
    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 there! A note: we prefer it if you are Forthright About Cross Posting <-- That's a link. I see you posted this earlier on Stack Overflow
     
    Marcos AntonioPS
    Greenhorn
    Posts: 11
    • Likes 1
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Jj Roberts wrote:Hi there! A note: we prefer it if you are Forthright About Cross Posting <-- That's a link. I see you posted this earlier on Stack Overflow



    Done. I updated my post. Thank you.
     
    Jj Roberts
    Bartender
    Posts: 331
    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
    On your question, I don't know if you can. Wildfly's release notes mention this especially

    Wildfly 21 release notes wrote:Please note that WildFly runs on Java 11 and later in classpath mode.

     
    Marcos AntonioPS
    Greenhorn
    Posts: 11
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Jj Roberts wrote:On your question, I don't know if you can. Wildfly's release notes mention this especially

    Wildfly 21 release notes wrote:Please note that WildFly runs on Java 11 and later in classpath mode.



    Thank you for your answer.

    Yes, I read this same note you cited yesterday in the release notes.

    But I would like to know if there's some way to have some kind of workaround this fact and make Wildfly runs an application on the modulepath.
     
    I need a new interior decorator. This tiny ad just painted every room in my house purple.
    SKIP - a book about connecting industrious people with elderly land owners
    https://coderanch.com/t/skip-book
    reply
      Bookmark Topic Watch Topic
    • New Topic