On 11/14/26 14:21, Neil C Smith via dev wrote:
> On Mon, 9 Nov 2026 at 13:27, Michael Bien <[email protected]> wrote:
>> I "bit the bullet" this Sunday when I tried to update editor support to
>> JDK 28 and rewrote the whole nb-javac build from scratch:
>>
>> https://github.com/mbien/nb-javac/tree/bootstrap
> Fantastic!  Thanks for working on this.
>
>>  - big one: current nb-javac has ct.sym of JDK 24 in it. This got
>> automatically fixed by actually building the upstream jdk since that is
>> where it's from.
> I'm curious why this approach, as opposed to either forcing the build
> to be done on the matching JDK; or downloading, extracting and caching
> the file from an upstream built JDK?  Possibly an unnecessary extra
> layer of complexity?
Hi,

so what we know is that the build needs the upstream JDK for at least
two things:

 - the javac source code, which will be transformed by jackpot and
patched as last resort if jackpot can't transform something
 - upstream ct.sym, which is a build artifact

Can we run the build itself on the upstream JDK and compile down to JDK
21: yes most likely. But does it actually reduce complexity: i am not sure.

(But this was actually the original idea of the branch, thats where
"bootstrap" comes from)

I think building with JDK 21 could be also seen as first unit test it
has to pass + it avoids having to run the build on EA JDK checkouts (the
compiler used to build the project is GA and went through the TCK
without extra sauce).

> Does ct.sym include version info somewhere that can be validated
> against the build version?  Maybe I missed something there already?

in a nutshell: ct.sym are archived java signatures of earlier JDK
releases which javac uses to link programs against when --release N is
used. This avoids linkage bugs like the ByteBuffer NoSuchMethodError
from the webstart era*.

By picking ct.sym from the upstream JDK, the backported javac should
have the full range of API sigs it was designed to use. (current
nb-javac doesn't do that)

can we regression test this? Pretty sure we can but we don't really
transform the ct.sym its taken 1:1.

-mbien

* https://www.morling.dev/blog/bytebuffer-and-the-dreaded-nosuchmethoderror/

>
> Best wishes,
>
> Neil
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Reply via email to