Update JDK
Overview
Idempiere move to jdk-10 by ticket IDEMPIERE-3798. This page collect some relate note
note focus to jdk-10 but maybe apply for jdk-11 and next
don't forgot we also move to Building iDempiere by tycho
Setup jdk
you can install jdk-10 as default jdk on your system (1) or install as non-default jdk (2) or you can download zip and extract to a folder (3)
on case (1) don't need to care anything. but on (2), (3) we have some configuration must to change
- configuration eclipse run with jdk-10
open [eclipse-root]/eclipse.ini above "-vmargs" add:
-vm path to jdk folder
- run maven command with jdk 10
export JAVA_HOME=path to jdk folder mvn validate
know issue
Access restriction
sometime (special first time you update to this ticket) you get bellow issue with "mvn verify" command
[ERROR] /home/hieplq/1Dev/project/native/idempiere-dev-11/org.idempiere.webservices/WEB-INF/src/org/idempiere/webservices/fault/IdempiereServiceFault.java:[17] [ERROR] import javax.xml.ws.WebFault; [ERROR] ^^^^^^^^^^^^^^^^^^^^^ [ERROR] Access restriction: The type 'WebFault' is not API (restriction on classpath entry '/home/hieplq/.m2/repository/p2/osgi/bundle/jaxws-api/2.3.1/jaxws-api-2.3.1.jar')
solution: delete maven local repository at ~/.m2/repository
run idempiere server from eclipse is difference from command line
from jdk-9, EE package is plan to take out.
at jdk-9, jdk-10 it mark deprecate for remove.
Modules Shared with Java EE Not Resolved by Default
at compiler time of eclipse and tycho, also run idempiere server by command line it follow this rule
that package use from replace library like javax.transaction-api, jaxb-core, jaxb-impl, jaxws-api
when launching idempiere server from eclipse, it auto append add-module=all-system, so some code can use package from replace library other use package from jdk
so can make some function run wrong (example webservice)
solution: for debug on development time, should use remote debug when get trouble.
Internal APIs
"Internal APIs" a bit same "Modules Shared with Java EE Not Resolved by Default" but it not yet have replacement so it don't make conflict like "Modules Shared with Java EE Not Resolved by Default"
idempiere depend on some Internal APIs like awt. Work-around by force it appear again by use add-exports
Java mail certificate
issue:PKIX path building failed: SunCertPathBuilderException: unable to find valid certification path to requested target
reason and solution:
https://dzone.com/articles/openjdk-10-now-includes-root-ca-certificates
Reference
IDEMPIERE-3798:Move iDempiere default branch to openjdk 10
oracle jdk releases for java 11 and later
do not fall into oracles java 11 trap
java updates jetty and the future
https://www.oracle.com/technetwork/java/javase/9-deprecated-features-3745636.html
https://docs.oracle.com/javase/9/docs/api/deprecated-list.html
http://openjdk.java.net/jeps/277
https://docs.oracle.com/javase/9/migrate/toc.htm#JSMIG-GUID-7BB28E4D-99B3-4078-BDC4-FC24180CE82B