question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Supported versions of Java?

See original GitHub issue

Which versions of Java does HtmlUnit support?

I did not find any mention if it does support Java9+ and no luck building it myself so far, keep getting

java.lang.module.FindException: Unable to derive module descriptor for \xalan-2.7.2.jar

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
ghostcommented, Jan 29, 2019

! Warning this comment might seem like someone from an angry reddit community wrote it, so you can always choose to ignore this, or ask me to delete this.

Are there any disadvantages of not using modulepath apart form the compiled code taking more space, both when running and on the disk?

Actually there is a problem, but not everyone faces it. Adding dependencies to classpath doesn’t make it not-a-module, in fact it is treated as an unnamed module which exports all packages and can access all packages (which module system doesn’t allow). it usually doesn’t create a problem though. (this only happens if you are using a combination of classpath and modules)

But issues come when one module reads packages from different libs. Mostly it will be shown during maven/gradle build. it looks like something this "module A reads package B from both C and D "

It is something that I faced when trying build htmlunit with java11, some of the libraries that htmlunit uses also have not migrated to java 9 or above. example apache-commons.

Similar issues are being reported everywhere since java9, yes it broke a lot of libraries!

If it is just a warning, we could ignore that and patch it up later. but when I used htmlunit with javafx.web module on openjfx11 everything started to break due to split packaging.

There are different solutions for this.

  1. Add everything in classpath and use it like java 8. (I would rather go back to using java 8.)
  2. Exclude conflicting packages using gradle/maven exclude functions like this.
  3. Merge the conflicting jars to single jar file.
  4. Migrate every dependencies to java 9 and above and make them modular.

If you are creating an app or trying to run some tests none of these actually matter. just getting your code running will be your first priority.

But what if I want to create a library with dependency to some jar that is not modular? people will start whining the same way that I am doing here right now to make it modular so that it would future compatible.

So I have 4 solutions that would work for me.

  1. Stick with OpenJDK 8.
  2. Wait for all libraries to upgrade while I’m using OpenJDK 8.
  3. Try doing that task on my on and contribute to htmlunit somehow with my noob knowledge
  4. Do nothing and drop my project like all of my other side projects.

I am trying option 3 right now with a lot of build errors, but I may be able to fix them or I will just fail at it…

0reactions
skyhiridercommented, Oct 31, 2022

I’ve been using HtmlUnit for several years now with the latest Java version without any issues so I don’t think its a problem anymore, therefore will close my own issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Oracle Java SE Support Roadmap
Oracle provides this Oracle Java SE Support Roadmap, to help you understand maintenance and support options and related timelines.
Read more >
Java/OpenJDK - endoflife.date
Release Released Active Support 19 2 months and 3 weeks ago. (20 Sep 2022) Ends in 3 months. (21 Mar 2023) 18 8 months and...
Read more >
Java version history - Wikipedia
Regarding Oracle Java SE Support Roadmap, version 19 is the latest one, and versions 17, 11 and 8 are the currently supported long-term...
Read more >
Java Versions and Features - Marco Behler
As of September 2022, Java 19 is the latest released Java version. In March 2023, Java 20 will follow. The last long-term support...
Read more >
Oracle extends Extended support for Java 8 - InfoWorld
Still the most widely used version Java, Java 8 will be eligible for Oracle's fee-based support through 2030.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found