apache / apache/netbeans

Obsolete endorsed.classpath added in Java web projects while opening projects

Open
#8,001 4 comments 0 reactions 0 assignees View on GitHub
Ant kind:bug needs:triage
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans 23

### What happened

Extension mechanism and endorsed classpath are not supported since Java 9 (see https://bugs.openjdk.org/browse/JDK-8065702)
This introduces javax classes namespace when using jakarta ee 9+ and break compile or execution
HTTPS and NG Test support broken (sometimes).
Code generation with wsimport broken.
Certainly other problems not detected.
Makes no sense in Java 9+ projects.

### Language / Project Type / NetBeans Component

Java ant web project

### How to reproduce

Create a Java ant web project.
Exit and restart Netbeans.

### Did this work correctly in an earlier version?

No / Don't know

### Operating System

Windows 11

### JDK

JDK 21

### Apache NetBeans packaging

Apache NetBeans provided installer

### Anything else

The issue exists since namespace change (javax -> jakarta)
Our workaround consists in emptying endorsed.classpath with an ant script in all projects and removing jars from nblibraries.properties

### Are you willing to submit a pull request?

No

Contributor guide

Open the contributing guide

Research direction

Start by inspecting how Java ant web projects are created and reopened on JDK 21, focusing on endorsed.classpath and nblibraries.properties. Reproduce the issue with a new project, then verify that Java 9+ projects no longer receive the obsolete endorsed classpath and that Jakarta-based compilation and execution are not broken.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.