Yay! that worked. Thanks. Is it possible to add a section to that docs page about using an IDE debugger? It was not obvious that one should use ...\OpenJDK\jdk\build\windows-x86_64-server-release\images\jdk instead of ...\OpenJDK\jdk\build\windows-x86_64-server-release\jdk to connect the jdk source files to the debugger.
On Fri, Jul 12, 2024 at 8:15 PM Chen Liang <liangchenb...@gmail.com> wrote: > Hi Anil, > If you want to use your local JDK, first build with "make images" and then > add the JDK in this directory: > <JDK git repo>/build/<config name>/images/jdk > "config name" should be chosen by you or configure, looks like > "windows-x86-64-server-release" > Note there's an exploded jdk at /jdk instead of /images/jdk; the one not > in images is exploded and does not have sources. > > Regards > > On Fri, Jul 12, 2024 at 7:55 PM Anil <1dropafl...@gmail.com> wrote: > >> I am trying to learn the Streams package of the JDK, and successfully >> built the jdk. >> I set the IDE (IntelliJ Community Edition) to use the JDK. >> I put some dummy output statements in a stream method, peek(), and built >> the JDK again. >> I was stepping through a toy Java program that uses it, but I see that >> when it gets to the core/base libraries, it does not use the Java code, but >> rather, the decompiled code. >> How to get the IDE to use the Java code? >> Here is the code I changed in java.util.stream.ReferencePipeline.java >> >> public final Stream<P_OUT> peek(Consumer<? super P_OUT> action) { >> Objects.requireNonNull(action); >> System.out.println("=========anil 3 ================"); >> return new StatelessOp<>(this, StreamShape.REFERENCE, >> 0) { >> @Override >> Sink<P_OUT> opWrapSink(int flags, Sink<P_OUT> sink) { >> return new Sink.ChainedReference<>(sink) { >> @Override >> public void accept(P_OUT u) { >> System.out.println("=========anil 0 ================"); >> action.accept(u); >> System.out.println("=========anil 1 ================"); >> downstream.accept(u); >> System.out.println("=========anil 2 ================"); >> } >> }; >> } >> }; >> } >> >> thanks, >> Anil >> >> >> >