Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

The "-source XX" and "-target XX" java compiler parameters should no longer be used in Ant project

Aperta
#9,429 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
java
Ambito
build-system

Direzione di ricerca

Inizia individuando dove NetBeans assembla le opzioni javac per i progetti Ant e dove vengono aggiunti i valori di -source e -target. Traccia l’invocazione del compilatore e verifica come viene rappresentata la versione di destinazione richiesta. Il lavoro è completato quando le build Ant usano --release senza opzioni source o target in conflitto e l’avviso sul modulo di sistema è risolto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Ant Java kind:feature needs:triage
Description

In Ant project, NetBeans is still using obsolete "-source XX" and "-target XX" java compiler parameters. It does not guarantee the compatibility with the target version, because it does not use proper system modules for compilation. The --release XX parameter should be used instead. The compiler warning is clear.

warning: [options] location of system modules is not set in conjunction with -source 11
not setting the location of system modules may lead to class files that cannot run on JDK 11
--release 11 is recommended instead of -source 11 -target 11 because it sets the location of system modules automatically

Use case/motivation

The "--release" parameter cannot be used in additional compiler options, because it collides with -target and -source parameters.

error: option --source cannot be used together with --release
error: option --target cannot be used together with --release
Usage: javac
use --help for a list of possible options

Related issues

No response

Are you willing to submit a pull request?

No

Lingua principale
Java
Stelle
3.1k
Fork
939
Merge medio
5g 12h
PR unite (30g)
23

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/netbeans

Tutte le issue di apache/netbeans

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.