Hi, This could be a stupid question. Can anyone help me out? I have jre installed in Unix machine. My question is Do I have to set $PATH in my .sh file to run the java program? I am getting java.lang.NoClassDefFOundError.JRE not found.I know it is not able to identify the JRE. Can anyone throw some light on this issue?
What happens when you type java -version at the command prompt?
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Joined: Nov 03, 2004
Hi, When I type java -version, I get jdk1.5. Why I get JRE not found error.I though we need $PATH to be set explicitly only if I compile my java program in that machine.If I just run my Java Program , I don't need the $PATH to be set as $CLASSPATH will take care of it know.Please correct me if I am wrong. Thanks in advance,
The fact that you can type "java -version" and see "1.5" means that PATH is already set properly.
There is no program named "JRE" or "jre". The "JRE", the "Java Runtime Environment" includes the "java" application launcher, the Java runtime libraries, and other components needed to run Java software. The "JDK" or "J2SDK", the "Java Development Kit", includes everything that's in the JRE, plus the Java compiler javac and other development tools.