Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why there is no java.nio.ByteBuffer in the source code of Openjdk1.8?

Tags:

java

nio

Recently I was reading the source code of OpenJDK1.8 and have a question about the source code. The question as below. Anyone can help?

The ByteBuffer class exists below the package java.nio in Oracle Java1.8, but I found there is no such class in the same package of OpenJDK1.8. I downloaded the source code of OpenJDK1.8 from here.

like image 888
MingJun Duan Avatar asked Oct 31 '25 17:10

MingJun Duan


1 Answers

The source files with the .template suffix are processed in the JDK build to generate the classes at build time. For example, ByteBuffer (along with all IntBuffer, LongBuffer, ...) are generated from X-Buffer.java.template. If you have your own build then look in the gensrc tree in the output directory to see the generated classes.

like image 78
Alan Bateman Avatar answered Nov 03 '25 09:11

Alan Bateman