diff --git a/README.md b/README.md index 56405c6..3d0dff1 100644 --- a/README.md +++ b/README.md @@ -73,12 +73,12 @@ O núcleo carrega **todos os `*.jar`** em `PITIUPI_HOME/plugins`. Detalhes: [pit | Ferramenta | Uso | | --- | --- | -| **JDK** com `javac` | Compilação (OpenJDK **25** recomendado; núcleo Java 17) | +| **JDK** com `javac` | Compilação **Java 17+** (núcleo e plugins usam bytecode 17) | | **Apache Ant** | Módulos NetBeans | | **python3** | Script `scripts/pitiupi.sh` (ler o catálogo) | ```bash -sudo apt install openjdk-25-jdk ant +sudo apt install openjdk-21-jdk ant ./scripts/pitiupi.sh check cd pitiupi && ant test # testes JUnit do núcleo ``` diff --git a/docs/documentation/00_quickstart.md b/docs/documentation/00_quickstart.md index 30c1700..5dacfbf 100644 --- a/docs/documentation/00_quickstart.md +++ b/docs/documentation/00_quickstart.md @@ -2,13 +2,14 @@ ## Pré-requisitos -- **JDK completo** (`java` e `javac`) — OpenJDK 25 recomendado; o núcleo usa `javac.source/target=17`, plugins Ant usam 25. +- **JDK completo** (`java` e `javac`) — **Java 17 ou superior** (17, 21 ou 25). Núcleo e plugins compilam com `javac.source/target=17`. - Apache Ant (`pitiupi`, `plugins/chat`, `plugins/screencast`) Ubuntu / WSL: ```bash -sudo apt install openjdk-25-jdk ant +sudo apt install openjdk-21-jdk ant +# ou: openjdk-17-jdk which javac ant ``` diff --git a/docs/documentation/03_build_ant_netbeans.md b/docs/documentation/03_build_ant_netbeans.md index 07c301a..3a6e05e 100644 --- a/docs/documentation/03_build_ant_netbeans.md +++ b/docs/documentation/03_build_ant_netbeans.md @@ -3,8 +3,8 @@ | Módulo | Build | Java | | --- | --- | --- | | `pitiupi` | Ant | 17 | -| `plugins/chat` | Ant | 25 | -| `plugins/screencast` | Ant | 25 | +| `plugins/chat` | Ant | 17 | +| `plugins/screencast` | Ant | 17 | ```bash cd pitiupi && ant jar diff --git a/plugins/chat/nbproject/project.properties b/plugins/chat/nbproject/project.properties index 45f36e7..18c0c57 100644 --- a/plugins/chat/nbproject/project.properties +++ b/plugins/chat/nbproject/project.properties @@ -47,8 +47,8 @@ javac.modulepath= javac.processormodulepath= javac.processorpath=\ ${javac.classpath} -javac.source=25 -javac.target=25 +javac.source=17 +javac.target=17 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir} diff --git a/plugins/screencast/.idea/misc.xml b/plugins/screencast/.idea/misc.xml index 59ad060..0623d9d 100644 --- a/plugins/screencast/.idea/misc.xml +++ b/plugins/screencast/.idea/misc.xml @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/plugins/screencast/nbproject/project.properties b/plugins/screencast/nbproject/project.properties index ef9e717..db63554 100644 --- a/plugins/screencast/nbproject/project.properties +++ b/plugins/screencast/nbproject/project.properties @@ -45,8 +45,8 @@ javac.modulepath= javac.processormodulepath= javac.processorpath=\ ${javac.classpath} -javac.source=25 -javac.target=25 +javac.source=17 +javac.target=17 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir} diff --git a/scripts/pitiupi.sh b/scripts/pitiupi.sh index 6ad53fd..40138ce 100755 --- a/scripts/pitiupi.sh +++ b/scripts/pitiupi.sh @@ -240,6 +240,14 @@ check_tools() { registry_python validate printf 'OK plugins.registry.json\n' fi + if command -v javac >/dev/null 2>&1; then + local javac_major + javac_major="$(javac -version 2>&1 | grep -oE '[0-9]+' | head -1)" + if [[ -n "${javac_major}" && "${javac_major}" -lt 17 ]]; then + printf 'ERRO: javac precisa ser Java 17 ou superior (atual: %s)\n' "$(javac -version 2>&1)" >&2 + ok=1 + fi + fi return "${ok}" }