• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

How to see java.lang.Thread Source  RSS feed

 
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Hi ,

Please tell me this :



How can i see a java.lang.Thread Source ?

What is the name of the jar file i need to extract ?

Thanks in advance.


 
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
find the src.zip under your jdk installation directory , and extract it .
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much .

I am not afraid to ask this question in Java Beginer Forum .

I have gone through source code of Object.java under lang package . I couldn't find any variables in it . So from where does all these primitive types come from ??
 
Sheriff
Posts: 21459
96
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the language specification. int, double, etc are not Objects, they are something totally different.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Rob .

I agree that they are something different and not related to Object class .

But can you please tell me then how they are related to Java ?
 
Ranch Hand
Posts: 607
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The native types are not Objects. They are probably implemented somewhere in the JVM code (Native code).
There is usually a lot of debate whether the primitive type should be Objects or native. Making them Object is a overhead that the Java team decided to avoid. Instead the provided the wrapper class for each of the native types - that could be used with say Collections that did not support native types (autoboxing changes these rules a bit ).

So if you looking for where the 'int' 'float' are implemented you might have to go look at the JVM code (Actually i am not 100% on this.)
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Sam , thats great explanation . Thank you very much .
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!