• 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

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
     
    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 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
    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
    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.
     
    What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
    the value of filler advertising in 2021
    https://coderanch.com/t/730886/filler-advertising
    reply
      Bookmark Topic Watch Topic
    • New Topic