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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mick BarryJava DeveloperCommented:
> 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?
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...
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

Mick BarryJava DeveloperCommented:
how are you starting it?
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..

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!
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).
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.