Win a copy of Terraform in Action this week in the Cloud 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

The Java Module System: To what extend it's possible to migrate

 
Ranch Hand
Posts: 109
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Nicolai,

There are more challenges migrating from Java 5/6/7 than migrating from Java 8?
To what extend it's possible to migrate a legacy application without the need to make code changes to the code base, apart from setting the proper VM properties?

As with everything else, Java modules is not for all applications. When it's NOT recommended, besides the compatibility with application server?
 
Greenhorn
Posts: 17
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

To what extend it's possible to migrate a legacy application without the need to make code changes to the code base, apart from setting the proper VM properties?



With VM options, I assume you mean --add-exports and the like? You should see them for what they are: An escape hatch and an expression of existing technical debt. They should always be the last fix you employ.

That said, it's hard to answer your question as it is - it really depends on the project. But, generally speaking, the larger the project, the more dependencies it has, and the older they are, the higher is the chance that you can not simply dump it on the Java 9 class path and expect it to work. There are a bunch of things that can go wrong (see this thread for a little more detail, or this post for a lot more) and the indicators I mention make it more likely that at least one of them occurs.

As with everything else, Java modules is not for all applications. When it's NOT recommended, besides the compatibility with application server?



Just to make this very clear: You don't have to create modules. When it comes to considering whether you want to and how to do it incrementally, have a look at this thread.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic