This week's giveaway is in the OCPJP forum.
We're giving away four copies of Practice Tests for OCP Java 17 Certification Exam (1Z0-829) and have Paul Anilprem on-line!
See this thread for details.
Win a copy of Practice Tests for OCP Java 17 Certification Exam (1Z0-829) this week in the OCPJP forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

do we need jre to run java programs ?

 
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
do we need jre to run a java program or not ?
if yes please explain why we need it ?
 
Sheriff
Posts: 67641
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
JRE stands for Java Runtime Environment. It consists of a number of components including the JVM. The JVM is responsible for running Java byte-code so without it, a class file is just a useless file of bytes.
 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:JRE stands for Java Runtime Environment. It consists of a number of components including the JVM. The JVM is responsible for running Java byte-code so without it, a class file is just a useless file of bytes.


hi thanks for the reply that means my teacher was wrong she said we dont need jre to run java programs ....
and 1 more thing ...can we write kernal for os in java
like in c we can write but can we in java ?
 
Bear Bibeault
Sheriff
Posts: 67641
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

hi thanks for the reply that means my teacher was wrong she said we dont need jre to run java programs ....


Yes, a JRE is required.

and 1 more thing


"one", not 1.

...can we write kernal for os in java
like in c we can write but can we in java ?


No. What would the JRE execute on?
 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:

hi thanks for the reply that means my teacher was wrong she said we dont need jre to run java programs ....


Yes, a JRE is required.

and 1 more thing


"one", not 1.

...can we write kernal for os in java
like in c we can write but can we in java ?


No. What would the JRE execute on?


if you are asking me , i didnt get your point can you elaborate please
 
Bear Bibeault
Sheriff
Posts: 67641
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
The point is that a JRE is needed to run Java. So it cannot be realistically used to write an OS kernel.
 
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
There have been some processors in the past (I think one of them was named PicoJava) which could run Java bytecode natively. When you'd have that, you would not need a software JVM to run Java - the processor would run the bytecode directly. However, that never became a big success. There have also been attempts to write an operating system in Java. These had to have some part in native code for the JRE, so it's not pure Java.

But the point is that Java was never meant to be a low-level systems programming language, so even though you could write an OS in mostly pure Java, it would probably not be a really good idea.
 
Slime does not pay. Always keep your tiny ad dry.
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic