• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Where is java.lang package??

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am just curious where will the java.lang file which is de path of de default package of java is saved in our jdk folder??
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

"java.lang" is not a file, it is a package. The classes contained in it are kept with all the other classes in a big jar file somewhere in the JDK installation. The fact that you don't have to import that package in your source file is merely a convenience provided by the compiler; it does not make that package special in any other way.
 
Kums Vijayan
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for dis info...But where in particular will de java.lang package stored and will it be invoked by de java complier or JVM???
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you look through your JDK installation, you will find a big jar file somewhere that contains all the classes. You can use the "jar" tool -and particularly the "jar -tf" option- to examine what's in a jar file.

I'm not sure what you mean by "invoke" - the classes are *used* by the JVM, and thus by all tools that use the JVM: java, javac, jar, ...
 
Kums Vijayan
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks... got de jar file...it was in C:\Program Files\Java\jdk1.6.0_11\jre\lib\rt.jar
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are interested in the source code of classes in the java.lang package, then have a look at your JDK installation directory; you'll find a file named src.zip there that contains the source code.
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kums Vijayan wrote:de path of de default package


Kums Vijayan wrote:dis info... [snip] de java.lang package [snip] de java complier


Kums Vijayan wrote:got de jar file...


Please use real words. It's "the" and "this", not "de" and "dis".
 
Kums Vijayan
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the help...
 
Why fit in when you were born to stand out? - Seuss. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic