Rob Spoor

+ Follow
since Oct 27, 2005
Rob likes ...
Chrome Eclipse IDE Java Spring Ubuntu VI Editor Windows
Forum Moderator
Rob Spoor currently moderates these forums:
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads

Recent posts by Rob Spoor

Tim Holloway wrote:

Rob Spoor wrote:So far that's pretty limited, with the exception of the removal of all JEE modules in Java 11.

JEE modules have never been "in" Java.

There were a few. lists the modules that were part of the (that's the correct name) module. It included JAXB, JAF and a subset of JTA and JAX-WS, as well as a module with package javax.annotation (with @PostConstruct and @PreDestroy). Those are all gone since Java 11, and can only be accessed by including a separate API and/or reference implementation.
12 hours ago

Mike Simmons wrote:Yeah, nowadays every 3rd release is supposed to be a long-term support release, starting with Java 8, then Java 11, and presumably Java 14 when it comes out.

LTS releases come every 3 years, not every 3 releases. The next one is going to be 17, in 2 years time.

I still mostly work on Java 8 for my library work, to keep a broader audience (and even a few Java 7 file system implementations). At work we've started on our first Java 11 projects, with no plans to use anything newer until Java 17.

@Piet: I'd upgrade to Java 11, but no further for anything that should be production ready. For hobby projects you can try Java 12 or 13, although Java 13 probably doesn't work with most tools yet.
1 day ago
These days I prefer to use They've added OpenJDK 13 already, but you can still download older versions. Not just the LTS versions 8 and 11, but also OpenJDK 9 and 10 which are no longer available at Oracle. (To be honest, I'm surprised they didn't remove JDK 12 already.)

I do have a login for the Oracle downloads, because it's still the easiest way to get the API downloads.
1 day ago

Tim Holloway wrote:but Java 6 apps should almost invariably compile and run unchanged on a Java 11 system.

Unfortunately, that can't be guaranteed anymore. Since Java 11, Oracle is throwing away some of the APIs. So far that's pretty limited, with the exception of the removal of all JEE modules in Java 11.

However, Eddie, unless you're using those (and you probably aren't), you should be safe.
1 day ago
Yesterday, Java 13 has been released. You can download it in a number of varieties:
* Oracle's (non-open) JDK:
* OpenJDK:

(AdoptOpenJDK doesn't have a Hotspot build yet)

For changes in the API, check There's nothing that stands out though; 3 new methods were added to String but these are deprecated because they are more or less experimental.
2 days ago

Tim Moores wrote:I like the image, but I have to admit that it's been years since I last noticed Duke anywhere. Very much an icon of the Sun years, not so much of Oracle.

I see him regularly:
1 week ago
Does user phpmyadmin even exist? If you install phpmyadmin, it doesn't automatically add a new database user.
Because I create official releases on the repository, if you watch the repository itself you can even let GitHub notify you when I make updates.
2 weeks ago

Stephan van Hulst wrote:More important than the new language features are the improved APIs. They are numerous, and it's important to stay up to date with them.

These are relatively easy to keep track off. I even automated most of it ( is mostly generated).

Language features are trickier though. Unlike API changes, they aren't as visible. I had to use Google to find Out of those changes, I only knew of "Local Variable Type Inference" (var), the forbidding of underscore (_) as variable name, and private interface methods. I forgot about those last two though. I never heard of the improved try-with-resources where you can use pre-existing variables.
2 weeks ago
computeIfAbsent takes a key and a function. If there is already a non-null value in the map for the key, it is returned. Otherwise, the function is called with the key as argument. The result of the function call, if not null, will be inserted into the map. It will also be returned (even if it's null).

In this case, the function will return a new set. The result will therefore be a non-null set - either the existing non-null set, or the newly created one. By calling add on this return value you save one get call on the map, making it slightly more efficient.
2 weeks ago
Welcome to the Ranch!

If you check the bottom of each page, you'll notice a "Powered by JForum" message.
2 weeks ago
Doesn't the console show more information about the error? Because probably, for whatever reason, npm install simply fails. It should show why.

To be honest, I'm not a big fan of the exec maven plugin, especially to run commands that need to be installed with a correct version. If an alternative is available, I'd try that instead. Good news: to run npm there is a good alternative: This downloads a node and npm to your local workspace (which you'd need exclude from your SCM, e.g. using .gitignore), which is then executed. That means that you'll always have the correct (and same!) version - the one you specify in your pom.
3 weeks ago
Assuming you're using servlets, this is what HttpServletRequest's getPart and getParts are for.
3 weeks ago
The Maven JLink Plugin may make it easier to do this. It's still pre-release though (the site just shouts that it is...).
1 month ago