Environment:APIJSON APIJSON Java 8 Plus
| Knowledge Sources | |
|---|---|
| Domains | Infrastructure, Java, ORM |
| Last Updated | 2026-10-11 00:00 GMT |
Overview
Java 8+ (JDK 1.8) runtime environment required by all APIJSON ORM core source files, compiled with Maven using source and target compatibility level 1.8.
Description
This environment provides the baseline Java runtime for the APIJSON ORM library. The project's pom.xml declares java.version = 1.8, maven.compiler.source = 1.8, and maven.compiler.target = 1.8, meaning the library targets the Java 8 bytecode specification. The code uses Java 8 features including lambda expressions, java.util.stream collections, and java.time APIs (LocalDateTime, Year, Month, DayOfWeek).
While the code compiles against Java 8, it is forward-compatible with Java 9+ runtimes. The JSR-223 script execution subsystem (JSR223ScriptExecutor) uses reflection-based fallback when the Nashorn script engine (removed in JDK 15+) is unavailable, so Nashorn-dependent features degrade gracefully on newer JDK versions.
Usage
This environment is the mandatory prerequisite for every APIJSON implementation. Any code that imports apijson.orm.* or apijson.* packages requires this runtime. The Maven pom.xml is the single source of truth for the minimum Java version.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | Any platform with a JVM | Linux, macOS, Windows all supported |
| Runtime | JDK 1.8+ | Java 8 minimum; Java 11+ recommended for production |
| Build | Apache Maven 3.16.0+ | Compiler plugin version declared in pom.xml |
| Disk | 50MB+ | For source, compiled JAR, and Maven dependencies |
Dependencies
System Packages
- JDK 1.8+ (OpenJDK or Oracle JDK)
- Apache Maven 3.x (build only)
Java Libraries
- No runtime third-party dependencies declared in pom.xml
- junit 4.13.2 (test scope only)
- JDBC driver JARs (provided by the application embedding APIJSON, not declared in the core pom)
Credentials
No environment-specific credentials required for the core library. Authentication tokens (e.g., database credentials, session secrets) are managed by the application embedding APIJSON.
Quick Install
# Install OpenJDK 8 (Ubuntu/Debian)
sudo apt-get install openjdk-8-jdk
# Verify Java version
java -version
# Build the project with Maven
cd APIJSON
mvn clean package -DskipTests
Code Evidence
Java version declaration in `pom.xml:17-20`:
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
Java 8 time API usage in `AbstractSQLExecutor.java:18-22`:
import java.time.DayOfWeek;
import java.time.LocalDateTime;
import java.time.Month;
import java.time.Year;
import java.time.temporal.TemporalAccessor;
Lambda expression usage in `JSR223ScriptExecutor.java:43-45`:
Object filter = java.lang.reflect.Proxy.newProxyInstance(
filterClass.getClassLoader(),
new Class<?>[]{filterClass},
(proxy, method, methodArgs) -> isClassExposureAllowed((String) methodArgs[0]));
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `Unsupported major.minor version 52.0` | Running on JDK < 8 | Install JDK 8 or higher |
| `ClassNotFoundException: jdk.nashorn.api.scripting.NashornScriptEngineFactory` | Nashorn removed in JDK 15+ | Use an external JSR-223 engine (GraalVM JS) or disable script functions |
| `java.lang.NoSuchMethodError` on `java.time` classes | Running on JDK < 8 | Upgrade to JDK 8+ |
Compatibility Notes
- JDK 8-13: Full support including built-in Nashorn JavaScript engine for script functions.
- JDK 14+: Nashorn removed; ENABLE_SCRIPT_FUNCTION requires an external JSR-223 engine (e.g., GraalVM). The createScriptEngine() method catches the class-not-found error and falls back to ScriptEngineManager.getEngineByName().
- JDK 11+: Recommended for production due to long-term support and performance improvements.
- Android: Not directly compatible without adaptation; APIJSON provides separate Android-specific modules in the broader ecosystem.
Related Pages
- Implementation:APIJSON_APIJSON_AbstractParser_parseResponse
- Implementation:APIJSON_APIJSON_AbstractParser_onVerifyLogin
- Implementation:APIJSON_APIJSON_AbstractVerifier_verifyLogin
- Implementation:APIJSON_APIJSON_AbstractParser_onObjectParse
- Implementation:APIJSON_APIJSON_AbstractObjectParser_parse
- Implementation:APIJSON_APIJSON_AbstractObjectParser_onParse
- Implementation:APIJSON_APIJSON_AbstractSQLConfig_gainSQL
- Implementation:APIJSON_APIJSON_AbstractSQLExecutor_execute
- Implementation:APIJSON_APIJSON_AbstractVerifier_verifyAccess
- Implementation:APIJSON_APIJSON_MethodAccess_Annotation
- Implementation:APIJSON_APIJSON_AbstractVerifier_verifyRequest
- Implementation:APIJSON_APIJSON_Operation_Enum
- Implementation:APIJSON_APIJSON_AbstractFunctionParser_invoke
- Implementation:APIJSON_APIJSON_JSR223ScriptExecutor_execute
- Implementation:APIJSON_APIJSON_Join_Class
- Implementation:APIJSON_APIJSON_AbstractSQLExecutor_executeAppJoin
- Implementation:APIJSON_APIJSON_AbstractSQLConfig_concatJoinWhereString
- Implementation:APIJSON_APIJSON_Logic_Class
- Implementation:APIJSON_APIJSON_AbstractSQLConfig_Where_Clause_Construction
- Implementation:APIJSON_APIJSON_AbstractSQLConfig_Column_Quoting
- Implementation:APIJSON_APIJSON_Subquery_Class
- Implementation:APIJSON_APIJSON_AbstractParser_onArrayParse
- Implementation:APIJSON_APIJSON_AbstractParser_Transaction_Management
- Implementation:APIJSON_APIJSON_AbstractSQLConfig_Fake_Delete
- Implementation:APIJSON_APIJSON_AbstractVerifier_AccessFakeDeleteMap
- Implementation:APIJSON_APIJSON_AbstractParser_extendSuccessResult
- Implementation:APIJSON_APIJSON_JSONResponse_format
- Implementation:APIJSON_APIJSON_AbstractSQLConfig_Dialect_Selection