• 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

Do we get Java by default when we load O.S? If so what does that java contains?

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,

I am new to core java.

My Doubt:

When we are going to load OS in the computer will we get Java by default? If so what options will be available for us

Today morning when my Sir was explaining about platform independent concept he told we can take the compiled code and execute on any O.S even though there is no Java as O.S will have some java settings for it.

Then what exactly does Java present in our O.S has I mean does it have JVM or JDK or JRE?

Depending on this answer I have one more doubt. Please clarify me at the earliest
 
Saloon Keeper
Posts: 7590
177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

When we are going to load OS in the computer will we get Java by default?


You can't generalize on that. Some OSes from some manufactures have it pre-installed, others don't. If you don't have it, you can get it somewhere around http://docs.oracle.com/javase/8/.

we can take the compiled code and execute on any O.S even though there is no Java as O.S


No. A JVM must be present.

does it have JVM or JDK or JRE?


See "What is a JVM? JRE? JDK?" on https://coderanch.com/t/660097/Wiki/Java-Beginners-Faq for an explanation what each of these is.
 
karthikeya kumar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply.

If O.S does not have Java installed or not then how come the byte code or the individual code gets executed.
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

karthikeya kumar wrote:
If O.S does not have Java installed or not then how come the byte code or the individual code gets executed.



If Java is not installed on the system, then the system can't run Java programs.

Henry
 
Saloon Keeper
Posts: 27807
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Karthikeya!

Java is a rather large software system and unlike COBOL and Fortran, it was developed as the property of a single corporation (Sun Microsystems). Sun was open to third-party implementations, so other vendors such as IBM produced their own products, such as J9.

However, the original Java implementation required some proprietary code, so the open-source OS's (such as Linux) couldn't include it and Microsoft got slapped for attempting to hijack Java into a proprietary system of their own, so Microsoft refused to bundle Java with Windows.

Sun worked on the proprietary issues as did a number of independent developers and the result was a series of JVMs ending up with the IcedTea JVM, which is a virtually complete implementation of the Java spec. This JVM is now routinely pre-installed as part of more popular Linux distros. Microsoft, however, still doesn't include Java with Windows.

One thing to note about the IcedTea JVM is that for a long time, it lacked certain features of the "official" JVMs, so it wasn't useful when you needed advanced JVM services, such as J2EE servers require. All of this is supposed to be fixed now, but most of us still prefer to use the Sun/Oracle JVM when doing industrial-grade Java work.
 
karthikeya kumar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Henry Wong wrote:

karthikeya kumar wrote:
If O.S does not have Java installed or not then how come the byte code or the individual code gets executed.



If Java is not installed on the system, then the system can't run Java programs.

Henry



Hi Henry,

I was explained by my sir that every o.s will have by default Java installed in that machine. What my question is what does that default Java that is installed during O.S has?

For example if I download Java from internet and try to install in my machine JDK , JRE and JVM will be installed. what is the difference between the Java that we download and install , default Java provided in O.S
 
Henry Wong
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

karthikeya kumar wrote:
I was explained by my sir that every o.s will have by default Java installed in that machine. What my question is what does that default Java that is installed during O.S has?



As mentioned by Tim, this is not necessarily true. There is no guaranteed that the OS you are using will have Java installed. There is also no guaranteed that the OS you are using will even have a version of Java that can run your byte codes.

karthikeya kumar wrote:
For example if I download Java from internet and try to install in my machine JDK , JRE and JVM will be installed. what is the difference between the Java that we download and install , default Java provided in O.S



See Tim's post above again -- which has a link for the explanation, of what is a JDK, JRE, and JVM.

Henry
 
karthikeya kumar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:Welcome to the JavaRanch, Karthikeya!

Java is a rather large software system and unlike COBOL and Fortran, it was developed as the property of a single corporation (Sun Microsystems). Sun was open to third-party implementations, so other vendors such as IBM produced their own products, such as J9.

However, the original Java implementation required some proprietary code, so the open-source OS's (such as Linux) couldn't include it and Microsoft got slapped for attempting to hijack Java into a proprietary system of their own, so Microsoft refused to bundle Java with Windows.

Sun worked on the proprietary issues as did a number of independent developers and the result was a series of JVMs ending up with the IcedTea JVM, which is a virtually complete implementation of the Java spec. This JVM is now routinely pre-installed as part of more popular Linux distros. Microsoft, however, still doesn't include Java with Windows.

One thing to note about the IcedTea JVM is that for a long time, it lacked certain features of the "official" JVMs, so it wasn't useful when you needed advanced JVM services, such as J2EE servers require. All of this is supposed to be fixed now, but most of us still prefer to use the Sun/Oracle JVM when doing industrial-grade Java work.




I was explained by my sir that every o.s will have by default Java installed in that machine. What my question is what does that default Java that is installed during O.S has?

For example if I download Java from internet and try to install in my machine JDK , JRE and JVM will be installed. what is the difference between the Java that we download and install , default Java provided in O.S
 
Tim Moores
Saloon Keeper
Posts: 7590
177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That seems to be the same question Henry already answered; did part of what he said not make sense? If so, please elaborate on what is still unclear.

Also, whoever "my sir" is, it's possible that he misspoke, or that you misunderstood what he meant, given that you're a beginner. Maybe you can ask him, too, for clarification.
 
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

You started off with a nice simple question, but the discussion became more complicated, so I shall move this discussion out of the ”Beginning” forum.
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

karthikeya kumar wrote:I was explained by my sir that every o.s will have by default Java installed in that machine.


This. Is. Not. True.

Clear now?
 
karthikeya kumar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:

karthikeya kumar wrote:I was explained by my sir that every o.s will have by default Java installed in that machine.


This. Is. Not. True.

Clear now?



Yes its clear.. Thanks for clearing my doubt
 
reply
    Bookmark Topic Watch Topic
  • New Topic