开发者

What is the use of rt.jar file in java? [duplicate]

开发者 https://www.devze.com 2023-02-12 06:20 出处:网络
This question already has answers here: 开发者_JS百科 Closed 10 years ago. Possible Duplicate: Why do we use rt.jar in a java project?
This question already has answers here: 开发者_JS百科 Closed 10 years ago.

Possible Duplicate:

Why do we use rt.jar in a java project?

I am very confused to knowing about rt.jar file.

What is the role of rt.jar file or use of rt.jar file in java??

Thanks.


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


Your question is already answered here :

  • Why do we use rt.jar file in java project ?

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 file

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

0

精彩评论

暂无评论...
验证码 换一张
取 消