JDK and JRE

Hi,

I'm puzzled with when I need to install JDK, when JRE for a client.

I have a program written, but it seems to be only workable on a PC installed with JDK, not JRE. Can someone tell me why? What could have happened? What I should look out in my code such that I can make it to run only on JRE?

Thanks!
amaiAsked:
Who is Participating?
 
aflat362Commented:
JDK = Java Development Kit

JRE = Java Runtime Environment

Use JDK To develop applications - it has a compiler (javac)

Use JRE to run applications - it is simply the runtime environment for executing applications and applets.

Some applications such as Apache Tomcat require a JDK to run because Tomcat itself uses the java compiler to compile servlets.
0
 
objectsCommented:
> I have a program written, but it seems to be only workable on a PC installed with JDK, not JRE.

That shouldn't be the case, what problems are you having running it on box with just JRE?
0
 
amaiAuthor Commented:
no errors... it just start, and then close by itself... but on the machines that i have JDK installed... it's running fine...
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
objectsCommented:
how are you starting it?
0
 
amaiAuthor Commented:
oh... i realized it's not the jdk/jre issue...

it's the way the program is written... i can only run it on the PC that is the server..

0
 
amaiAuthor Commented:
oops.. so sorry everyone.. it's because of an error in the config file for connection to the MOM. Thanks for all your efforts!
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Though in certain cases you will need a JDK (e.g. if you have an application which compiles some source-code on the fly and loads the newly compiled classes).
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.