• 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

what's JRE for ?

 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know j2sdk1.4.* is used for compiling my code and run my java code. What's JRE for ? when should I need it ? Please be specific
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The JRE (runtime environment) is everything somebody needs to run Java programs. So if you give your programs to somebody who is not a developer, you can give them the smaller JRE instead of the whole JDK. I've had good luck just copying it onto new machines and setting up some path & classpath stuff in a batch file to run a program. Doing a full-blown install may set some of that up automatically, but risks breaking another program that uses a different version of the JRE.
 
Frank Sikuluzu
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Stan James:
The JRE (runtime environment) is everything somebody needs to run Java programs. So if you give your programs to somebody who is not a developer, you can give them the smaller JRE instead of the whole JDK. I've had good luck just copying it onto new machines and setting up some path & classpath stuff in a batch file to run a program. Doing a full-blown install may set some of that up automatically, but risks breaking another program that uses a different version of the JRE.



I am not very clear about this. Do you mean

1. JRE is a subset of JDK ??
2. For JDK, you need to add PATH+\jdk1.4\bin\ in order to compile java code. For JRE, what PATH or CLASSPATh do you need to add in order to run java program ? I assume end users are NOT supposed to add any such thing...
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Frank Sikuluzu:

1. JRE is a subset of JDK ??


JDK = Java Development Environment = what we use to develop programs
JRE = Java Runtime Environment = what we use to run programs

Originally posted by Frank Sikuluzu:

2. For JDK, you need to add PATH+\jdk1.4\bin\ in order to compile java code. For JRE, what PATH or CLASSPATh do you need to add in order to run java program ? I assume end users are NOT supposed to add any such thing...


Nope. You can set up an icon, batch file or script to run your program with the correct path and classpath settings, package the app in an
executable jar file or launch it with java webstart.
 
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, JRE is a subset of JDK. When you install JDK, you automatically install JRE also. However, Sun has made them as two seperate packs so that the user, whose never going to compile in java, dosent have to download the huge JDK. But as a developer, you need to compile as well as run Java Applications.

Understood the diffrence?
 
reply
    Bookmark Topic Watch Topic
  • New Topic