At the moment we work with SonarQube 6.6. The reason is that something did not work correct with newer versions of SonarQube and they did not want to investigate this.
But it turns out that SonarQube 6.6 only partly works with Java 11. It seems to work, until you want to login. To login in SonarQube you need to use Java 8.
The latest version of SonarQube is 7.4. Would this version of SonarQube work with Java 11? Then maybe we should upgrade and fix the problems.
In the SonarCube 7.4. documentation, they clearly state that Java 8 is required to run SonarCube 7.4.
See also:
Java Runtime Engine support for SonarQube 7.x
which mentions that one roadblock has been a version of ElasticSearch for Java 11. Another issue seems to be that they were not keen to put effort into supporting Java 9 and 10, given that they were only going to be supported for 6 months each.
Related
I've been trying for a while now to get JDeveloper to use the latest JDK (17.0.1). I've searched around and the answers I've found have all said to change "SetJavaHome" in either jdev.conf or product.conf. I've tried both and both times when I tried to run JDeveloper it gave me a popup saying:
"You are attempting to run with Java 17.0.1
Running this product is supported with a minimum Java version of 1.8 and a maximum version less than 1.9.
Update SetJavaHome in
C:\Users\sudoc\AppData\Roaming\JDeveloper\12.2.1.4.0\product.conf to point to another Java.
This product will not be supported, and may not run correctly if you proceed.
Continue anyway?"
Since 1.8 is so far below 17, I feel like I might be trying to change the wrong thing. Any ideas? I'm running windows 11 and I just installed JDeveloper yesterday, so it should be the latest version.
Is there any compelling reason that you need to use JDeveloper? Otherwise, there are other options such as IntelliJ IDEA (community version) which is great for Java.
JDK 1.8 has passed a test of time and its very common to use that but jdk 17 is latest version and this version has not passed test of time so its better to use 1.8 or maybe jdk 11 is good too.
I want to install Java on a few different servers for running a third party service on tomcat.
I am not a Java developer and I got a bit confused when I began searching for the installer.
I checked the different Java versions and their long term support dates.
It seems that Java 11 JDK is - LTS so i decided to use it.
But when I was trying to find a runtime version (JRE?) since this is the version I am supposed to install on the server(?) I only found Java JRE 8.X.X, and this got me confused.
There is no higher major version of the JRE?
How does it work if you use the JDK 11 or even 14-15 as a developer and then use Java 8 JRE on your deployed servers?
Maybe the JDK holds inside of it the Java 8 JRE version?
Or do you actually need to install the JDK version on the servers instead?
The JRE is a subset of JDK. It contains everything needet to run Java applications but no support for development. So, if you need a JRE, a JDK is also good, although it conatins much stuff that you will not need.
Normally, for executing a Java application, you need a JRE with the same version or higher than the JDK used for development. But the developer can advise the compiler to generate code for a lower version. If he does so, he cannot use the features of the higher versions. For example the compiler of JDK 1.8 can produce code for JRE 1.6. You should consult the manual, to see which old versions are supported by the compiler of a specific version.
After some research,
It seems there is no separate JRE section anymore.
Also JDK 11 for production is not free and I guess this is an ongoing trend for the near future.
On a side note there is the open JDK 11 version but it does warn you about outdated security updates.
So basically in my case sticking to updated Java JRE 8 version is good enough for the near future.
Our company is planning to move towards AdoptOpenJdk 11 from Oracle JDK8 with Wildfly 10 running on it. All the code and wildfly server will be same(written and supported by JDK8) and since java is backward compatible, I think that it should work theoretically, but are there any issues that we have to be aware of?
There are a lot of updates from JDK 8 to JDK 11. I would recommend just moving to AdoptOpenJdk 8 in the short term. Your specific code may be ok, but you also have a huge set of dependencies that may be using something that needs updated. For example, what is your build tool? Gradle needed to be updated because it needed a newer version of ASM. Are you using JAX-RS? Jersey 2.27 doesn't work on Java 11.
JavaEE is in a weird place right now because Oracle basically dumped it on the Eclipse foundation (now called JakartaEE). It will take a little while for it to be sorted out.
I have migrated from openjdk-8 to openjdk-11.
Steps I follow:
1. Add missing Java dependencies in jdk11
2. Upgrade/remove supported plugins (Need to upgrade ASM to 7.1, cglib or other byte manipulation libs)
3. Change JAVA_OPTIONS related to GC.
4. Wildfly support for java11
More details on libs versions check the link
I know Java 11 has not been officially released yet, but has anyone tested Grails 3.x with an early access release of Java 11? Or does anyone know when or if Grails 3.x will support Java 11?
Well I know that the support for Java 9+ in Groovy is getting worked on and I think 2.5.2 had some fixes. Technically Groovy will work on newer versions of java, but you'll get a bunch of warnings. All of this is supposed to be worked out for Groovy 3.0, probably coming around the end of the year, based on what I hear at GR8Con.US.
All that being said, Grails 3.3 is on Groovy 2.4.x, with spring boot 1.2, which I don't think either support newer versions of Java. Grails 4 is supposed to be coming out by the end of the year, with Groovy 2.5, and a newer version of spring boot. Once Groovy 3 comes out it shouldn't be too long before Grails upgrades to it.
Also check out the Groovy Podcast, there was a metion on the support from Groovy:
https://youtu.be/XQLblr2OGJ8
I know Java 11 has not been officially released yet, but has anyone
tested Grails 3.x with an early access release of Java 11?
I tried using Grails 3.3.8 and the early access release of JDK 11 and it didn't work, but I wondered if that might be something to do with the JDK.
Then I tried again using Oracle's official release of JDK 11 which came out a couple of days ago. I rebuilt an existing Grails project in NetBeans 9.0 using JDK 11 / Grails 3.3.8, and got the following error:
Command [clean] error: Could not determine java version from '11'. (Use --stacktrace to see the full trace)
I get similar errors when using JDK 9 and 10, but the project builds and runs fine using JDK 8.
See this SO answer for a similar problem when using Grails with JDK 10: Could not determine java version from '10.0.2' while starting Grails 3.3.8 application:
Grails 3.3.8 does not support Java 10. You will have to use Java 7 or Java 8 if you want to use Grails 3.3.8.
Or does anyone know when or if Grails 3.x will support Java 11?
Grails 3.x won't ever support JDK 11 according to a Grails developer. See the comments for the SO answer I linked to above:
You have to wait for Grails 4 to use a JDK > 8.
I don't know anything about a proposed release date for Grails 4.
Java 11 is supported in Grails 4. However, note Grails 4 still builds on Groovy 2.5.x which doesn't run all that smooth on Java 9-11 compared to Groovy 3. So warnings and stuff like that is to be expected.
//EDIT 22/01/2022: Grails 5 is build is built on Groovy 3.0.x and therefore works smoothly with Java 11.
My web application runs fine on JDK 1.7 but crashes on 1.8 with the following exception (during application server startup with Jetty 8). I am using Spring version: 3.2.5.RELEASE.
Exception:
org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet
I assume that problem occurs because of spring and "asm.jar" library on which it depends.
How do I resolve this?
As #prunge and #Pablo Lozano stated, you need Spring 4 if you want compile code to Java 8 (--target 1.8), but you can still run apps on Java 8 compiled to Java 7 if you run on Spring 3.2.X.
Check out
http://docs.spring.io/spring/docs/current/spring-framework-reference/html/new-in-4.0.html
Note that the Java 8 bytecode level (-target 1.8, as required by -source 1.8) is only fully supported as of Spring Framework 4.0. In particular, Spring 3.2 based applications need to be compiled with a maximum of Java 7 as the target, even if they happen to be deployed onto a Java 8 runtime. Please upgrade to Spring 4 for Java 8 based applications.
If you encounter this error even if you compile with -target 1.7, please note that this is because of a bug in Spring Framework which causes ASM classreader to load jdk classes (java.* or javax.*), which are, of course, compiled with -target 1.8.
This, combined with the old ASM version in spring 3.2.8 and below, which does not support parsing of 1.8 class files, can also lead to this error.
More info about the issue can be found here: https://jira.spring.io/browse/SPR-11719
This should be fixed in Spring Framework version 3.2.9, which is due to be released soon.
Of course, upgrading to Spring Framework 4 will also resolve the issue, as it already contains a newer version of ASM.
However, if for some reason you can't upgrade to version 4 yet, it's good to know there's an alternative (soon).
I had the same problem and solved it. I am using spring 3.x with java 8. If above solutions are not working change the jars and search whether those jars are compatible with the java version you are using or not. spring 3.x is not compatible with java 8.
I had the same problem,
1.Go to:
maven -> executive maven goal -> mvn clean
It helps :)
2.Invalid caches..
This problem might because of wrong selection of environments. I tried changing JRE to Java SE 1.8 which is the Java version installed.
Project>>Right click>>Properties>>Java Build Path>>Libraries>>Double click JRE system Library>>Execution Environment to JAVA VERSION INSTALLED.
if you use java 8 or next version you need to upgrade spring version and spring version should be 4.xxx
Spring 4 can be used for java 8 to resolve this issue. I just tested it and it works.
This issue is fixed since Spring 3.2.9-RELEASE version.