Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Environment:Heibaiying BigData Notes Java 8 Maven Environment

From Leeroopedia


Knowledge Sources
Domains Infrastructure, Build_System
Last Updated 2026-02-10 10:00 GMT

Overview

Java 8 development environment with Apache Maven build system, forming the common base for all BigData-Notes code examples.

Description

This environment defines the shared Java 8 + Maven foundation used across all code modules in the BigData-Notes repository. Every subproject (Hadoop, Kafka, Flink, Storm, Spark, HBase, Phoenix, Zookeeper) targets Java 8 (1.8) source and target compatibility. Maven is used as the build tool with maven-compiler-plugin configured for Java 8 across all pom.xml files.

Usage

Use this environment as the prerequisite for all code examples in the BigData-Notes repository. Every Implementation page requires this base environment before any framework-specific dependencies.

System Requirements

Category Requirement Notes
OS Linux (CentOS 7.6 recommended) All installation guides target CentOS
Java JDK 1.8.0_201+ Oracle JDK or OpenJDK 8
Build Tool Apache Maven 3.0.4+ Required by all pom.xml files
Disk 1GB+ free space For Maven local repository cache

Dependencies

System Packages

  • `java-1.8.0-openjdk-devel` or Oracle JDK 1.8
  • `maven` >= 3.0.4

Environment Variables

  • `JAVA_HOME` = JDK installation directory
  • `JRE_HOME` = `$JAVA_HOME/jre`
  • `CLASSPATH` = `.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar`
  • `PATH` includes `$JAVA_HOME/bin`
  • `MAVEN_HOME` = Maven installation directory

Credentials

No credentials required for the base Java/Maven environment.

Quick Install

# Install JDK 1.8 (CentOS)
yum install java-1.8.0-openjdk-devel

# Set environment variables in /etc/profile
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin

source /etc/profile

Code Evidence

Java 8 target from `hadoop-word-count/pom.xml`:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
        <source>8</source>
        <target>8</target>
    </configuration>
</plugin>

Java 1.8 target from `flink-basis-java/pom.xml`:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.1</version>
    <configuration>
        <source>1.8</source>
        <target>1.8</target>
    </configuration>
</plugin>

Common Errors

Error Message Cause Solution
`JAVA_HOME is not set` Environment variable not configured Set JAVA_HOME in `/etc/profile` and run `source /etc/profile`
`javac: invalid target release: 1.8` JDK version mismatch Install JDK 8, not JDK 7 or 11
`Could not find or load main class` CLASSPATH misconfigured Verify CLASSPATH includes dt.jar and tools.jar

Compatibility Notes

  • All modules in the repository target Java 8. Do not use Java 9+ as some Hadoop/HBase libraries have compatibility issues with the module system.
  • Maven 3.0.4+ is required; Flink projects explicitly require this version or higher.
  • CentOS 7.6 is the recommended OS per the installation guides, but any Linux distribution with JDK 8 support works.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment