Completely lost with Java ... again

Nope, because the sdkmanager thing looked like another 2-3 hours to learn

Should just be this:
curl -s "https://get.sdkman.io" | bash

Once that completes, if successful, you can reopen the terminal, then this:
sdk install java 8.0.282.hs-adpt

This should prompt you if you want to use that version as the default, choose yes.

That should really be it?

1 Like

Thanks but I am a masochist

So. Mockito-cglib. What is it. Apparently causing this latest error

I see from the posted stack that it's running mockito 1.9.5 --
 it's a pretty old version -- it's been quite a long time since we released version 2. 
Mockito is now at 2.23.4 and it now uses ByteBuddy to generates mocks.
 And JDK 11 is fully supported starting 2.23.

Never ignore warnings. Find out who is to blame and poke them until they fix it. :P

Ignored warnings are how we end up with goto fail; scenarios.

Out of date aparently…

Contains the integration with cglib which has been discontinued in the core mockito in favor of ByteBuddy. The source code kept here ‘just in case’ we need that in the future. We hope not to ship Mockito with cglib any more.

And cglib is a bytecode generation library…

What is with all these dependencies? I’m half expecting it to pull in left-pad from NPM. :P

These warnings specifically are related to upgraded java between 8 and 9+. What it means is that the maintainers of the project need to update their code or it will stop working with future versions of Java.

In the case of this warning specifically, it is Mockito.

Looks like this project is half abandoned then :sweat_smile:

1 Like

What is the point of Java if the chain breaks as soon as there is a dependency that is not maintained?

I must be stupid. To me it defeats the whole purpose of having jit compiling

The problem here is a project that hasn’t been updated to run with newer versions of Java. The same thing can happen in any language as far as I’ve seen :eyes:

I’m still confused though, have you tried building from the latest branch from github using a newer jdk? Like I initially mentioned jdk 15 worked for me running from the latest commit :thinking:

1 Like

Exactly, poke them until they fix it. :P (Or abandon it for something else.)

It’s not just Java, there’s a lot of dependency systems like that unfortunately. That’s partly why a lot of larger repositories try to mark things as deprecated first and don’t remove them until much later.

That’s also why I made the reference to the left-pad incident. If you don’t know the full story, there’s an article about it here.

Essentially someone removed a lot of their modules from the NPM package management system, one of which was a package providing a single 11-line function (a function for left-padding strings with a specified character) and it broke a lot of very high-profile tools (e.g. React, Babel), which just goes to show how brittle a lot of popular dependency management systems really are.

The blog post I linked to before was a somewhat acerbic condemnation of people being daft enough to take on a dependency for the sake of a single 11-line function.

At any rate, it’s not Java’s fault (as a language), it’s partly a problem with the way package management is done in general, and partly a problem with people not updating their packages to work with newer versions.

JIT compilation exists solely for performance reasons. It has no real impact on the distribution chain - software and libraries will be distributed as source code or bytecode whether or not your JVM uses JIT compilation.


Like @torbuntu says, it seems they’ve fixed it on the master branch and just haven’t produced a new release yet, so you’d probably be best off either figuring out how to get it to work from the master branch or politely requesting a new release, citing your issues trying to get it working as justification.

2 Likes

@torbuntu I finally did it. Latest update to the OLS git repo and Java 11.0.10.hs-adpt

With latest java there were still some test issues. I downgraded to 11-0-10 and now it (seems) to work.

Thanks for sdkman.io , its a life saver

AND, need to run the client with ‘sudo ./run.sh’ because the ttyACM0 borks and I was unable to fix that even after adding myself to the dialout group

3 Likes

This definitely is a life saver. I’m happy it now also works on aarch64 :eyes: