amino-os / Amino.Run

Amino Distributed OS - Runtime Manager
Apache License 2.0
29 stars 12 forks source link

[JDK1.6 compatibile task #695 and #676] Update Amino codebase to use JDK 1.6 APIs #811

Open maheshrajus opened 5 years ago

maheshrajus commented 5 years ago

1) PR is raised for the issues #695 and #676 2) If any APIs used which are higher than JDK 1.6 version then compilation issues will be thrown 3) JAVA6_HOME need to be set if we want to compile the code with JDK1.6 ex: export JAVA6_HOME=/usr/lib/jvm/jdk1.6.X.X this we can set in gradle.properties also.

Note: Document changes we can handle in the issue: #694

Compilation Report: Screenshot from 2019-07-05 15-54-58

Sample Error: [when we used lambda expression in Amino.Run code] lamdaError

quinton-hoole commented 5 years ago

What is the status here @maheshrajus ? Did you discuss with @VenuReddy2103 ? Is this ready for review yet?

VenuReddy2103 commented 5 years ago

What is the status here @maheshrajus ? Did you discuss with @VenuReddy2103 ? Is this ready for review yet?

Discussion Summary:

  1. Our current gradle version(4.10) requires java 1.7 or later to be installed. It detects java version internally and throws below error if we don't have 1.7 or later version available. So we must have 1.7 or later installed. image
  2. Havejdk6Path property defined in properties file. This must be set with JDK 6 Path. Check and throw exceptions in following cases:
    1. if jdk6Path property is not set
    2. Or if that is set with some JDK other than 1.6. [We can extract java version with the provided jdk6Path property's bin folder, upon executing java --version internally]

NOTE: We just need JRE 1.6(actually require only rt.jar of 1.6). We don't need complete JDK 1.6 to be installed to compile source with 1.6 compatibility. Will check further on this.

maheshrajus commented 5 years ago

When JDK1.6 path not set: image

When JDK1.8 path set: image

Compilation & examples test report: image

image image