jre

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?

Thanks in advance,

[395 byte] By [tmmeta] at [2007-10-2 15:28:18]
# 1
HiYou should set PATH and CLASSPATH env variables.PATH = JAVA_HOME/binCLASSPATH = JAVA_HOME/jre/lib/rt.jarNo idea how to and where to set them in UNIX envHTHVJ
jain_vishal_aa at 2007-7-13 14:48:20 > top of Java-index,Desktop,Runtime Environment...
# 2

> Hi

>

> You should set PATH and CLASSPATH env variables.

> PATH = JAVA_HOME/bin

> CLASSPATH = JAVA_HOME/jre/lib/rt.jar

FYI, there is no need to set CLASSPATH to the above value; rt.jar will be

found by the JVM automatically.

However, the JVM will not find your application class file unless

(1) it is in the current directory, or (2) you add the directory where it

is stored to the CLASSPATH env var.

On Unix, these are normally set in either .profile (if your login shell is

ksh or sh), .login (if your login shell is csh), or .bash_profile (if your login

shell is bash).

jxca at 2007-7-13 14:48:20 > top of Java-index,Desktop,Runtime Environment...
# 3
> On Unix, these are normally set in either .profileOr in /etc/profile etc.
BIJ001a at 2007-7-13 14:48:20 > top of Java-index,Desktop,Runtime Environment...