添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

rt.jar contains all of the compiled class files for the base Java Runtime environment. You should not be messing with this jar file.

For MacOS it is called classes.jar and located under /System/Library/Frameworks/<java_version>/Classes . Same not messing with it rule applies there as well :).

http://javahowto.blogspot.com/2006/05/what-does-rtjar-stand-for-in.html

It's there in MacOSX under a different name classes.jar and it is under /System/Library/Frameworks/<java_version>/Classes . CoolBeans Sep 8, 2011 at 22:28 note - as of java 1.7, apple no longer distributes the jdk. The jdk from Oracle is in a different location /Library/Java/JavaVirtualMachines/jdk1.7.0_xx.jdk and has rt.jar not classes.jar Jay Feb 28, 2013 at 19:26 This is a very old answer, but it is still true after all these years. I figured out today. Marco Schoolenberg May 17, 2021 at 1:49

Basically, rt.jar contains all of the compiled class files for the base Java Runtime ("rt") Environment. Normally, javac should know the path to this

Also, a good link on what happens if we try to include our class file in rt.jar.