JDK 14 doesn't have rt.jar with it. Where are bootstrap classes then?

12.4k Views Asked by At

The only jar file I could find inside JAVA-HOME/lib was a file called jrt-fs.jar which is only 105 KB in size.

So where are Runtime (bootstrap) classes then?

2

There are 2 best solutions below

1
On BEST ANSWER

The rt.jar file was removed in Java 9, but if you need to access the classfiles in the runtime, you can do so easily through the JRT file system. See, for example, https://stackoverflow.com/a/53897006/3553087.

2
On

Allow me to quote the migration guide:

Class and resource files previously stored in lib/rt.jar, lib/tools.jar, lib/dt.jar and various other internal JAR files are stored in a more efficient format in implementation-specific files in the lib directory.