Like I told you on IRC , I have used <java.version>11</java.version> but it is still failing. please look through the error log here https://pastebin.com/n9QJP1r4
Still failing with a freshly cloned copy of the core. https://pastebin.com/ndZJzUuL
@irenyak1 did you reset you OS path variable to point to openjdk 11??
@irenyak1 is that where the server stops to run ??
at this pont
Custom JDK path:
you seem not have configured properly the system path path variable on you OS. It may be still pointing to a wrong JAVA version that you dont have installed.
Thats right ,there’s some little backward incopatibility between java 8 and 11.
when i look at this in your logs
[ERROR] /home/irynah/Openmrs-Projects/openmrs-core/tools/src/main/java/org/openmrs/tools/doclet/ShouldTaglet.java:[143,1] error: method does not override or implement a method from a supertype
The Old Doclet API in java 8 was deprecatd and finally removed in java 11, and replaced with another new Doclet API. This will require some little bit of refactoring some code. You can start a Talk thread about this. I would have done so , but currently i have alot of tasks am handling at the same time. cc @dkayiwa
Not really @mozzy I was setting up a new server using openjdk11 but if you look into the error log it shows that, (copied section from the error log)
- [INFO] — openmrs-sdk-maven-plugin:3.13.2:run-tomcat (default-cli) @ standalone-pom —
Using JAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64
Using MAVEN_OPTS: -Xmx768m -XX:MaxPermSize=512m
The JDK 11.0.3 is not compatible with OpenMRS Platform 2.1.4. Please use JDK 1.8 to run this server.
- If you are running in a forked mode, correct the java.home property in /home/irynah/openmrs/openmrsserver/openmrs-server.properties
Note, I configured well my system path variable and it points to java 11.
Why not stay on JDK 8 which is an LTS version until 2022?
True, while Oracle will stop providing support and mantainace for oraclejdk 8 and 11 unless the implementation pays for a licence , Red Hat takes on the role to support Openjdk 8 and 11 until June 2023 and October 2024 respectively. So may be its a good idea to still stick with java 8.
If we wait till 2023 to upgrade , there will be more stuff to fix and will be more painful than now. Also openn jdk 12 will not be the latest by that time . I think its better to start upgrading soon.
If we decide to updrade to java 11, we shall need some code refactoring to be compatible will java 11 and if possible backward compatible will java 8. Simply because , research shows java 8 has been the most used version of java by java clients , considering all the way from java 1 to12
or we stick with java 8 for now??
What you take on this??
Also do ensure to maintain backwards compatibility with JDK 8. With UgandaEMR we have just completed a migration from JDK 7 & currently have over 1000 sites running, and cannot change for at least another 2 years.
ya , thats really key
Do you have details of the exact changes that we would need to support Java 11?
here in this talk post
One major change that affects us was the replacement of the Doclet API in java 11 with a new Doclet Api. So we would need to refactor all our code that depended to the old API , to depend on the new Doclet API
Does everything else compile on Java 11 if you delete the ShouldTaglet.java file?
From the infrastructure point of view, moving to OpenJDK 11 really helps me a lot to support CI capabilities.
The older the JDK, the more likely it’s not supported by the distribution we have.I’m having a lot of trouble supporting JDK 7 already.
@dkayiwa let me try deleting that file and run it again and see if it compiles.