This week's book giveaway is in the Functional programming forum.
We're giving away four copies of Functional Design and Architecture and have Alexander Granin on-line!
See this thread for details.
Win a copy of Functional Design and Architecture this week in the Functional programming forum!
  • 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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: 362
    44
    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: 362
    44
    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.
     
    If you settle for what they are giving you, you deserve what you get. Fight for this tiny ad!
    Thread Boost feature
    https://coderanch.com/t/674455/Thread-Boost-feature
    reply
      Bookmark Topic Watch Topic
    • New Topic