13

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?

Naman
  • 27,789
  • 26
  • 218
  • 353
Joseph_Marzbani
  • 1,796
  • 4
  • 22
  • 36

2 Answers2

20

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.

Brian Goetz
  • 90,105
  • 23
  • 150
  • 161
  • 3
    Or [this one](https://stackoverflow.com/a/46451977/2711488), which also addresses the purpose of the remaining `jrt-fs.jar`. – Holger Jun 11 '20 at 13:38
4

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.

Aniket Sahrawat
  • 12,410
  • 3
  • 41
  • 67
  • Waiting for [Naman](https://stackoverflow.com/users/1746118)'s comment saying: *"Or you could just visit [xy](http://xy) website which will load contents faster"* ;) – Aniket Sahrawat Jun 11 '20 at 13:15
  • 1
    ...and the [JEP-220](http://openjdk.java.net/jeps/220) as quoted in [this answer](https://stackoverflow.com/a/35244168/1746118) already clarifies this with more details. If it was for specifically jrt-fs, Brian and Holger made the point pretty clear with the links they'd shared. – Naman Jun 11 '20 at 16:05