you need to set JAVA_HOME variable...have a look here Setting JAVA_HOME
Set JAVA_HOME on a UNIX System
The JDK software is installed on your computer, for example, at /usr/jdk/jdk1.6.0_02
. You can change this location.
Set JAVA_HOME.
Korn and bash shells:
export JAVA_HOME=jdk-install-dir
export PATH=$JAVA_HOME/bin:$PATH
Bourne shell:
JAVA_HOME=jdk-install-dir
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH
C shell:
setenv JAVA_HOME jdk-install-dir
setenv PATH $JAVA_HOME/bin:$PATH
export PATH=$JAVA_HOME/bin:$PATH
Change the permissions to enable you to run the GlassFish ESB Installer.
chmod 755 JavaCAPS.bin
Set JAVA_HOME on a Windows System
The JDK software is installed on your computer, for example, at C:\Program Files\Java\jdk1.6.0_02
. You can move the JDK software to another location if desired.
Set JAVA_HOME:
Right click My Computer and select Properties.
On the Advanced tab, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk1.6.0_02
.
also you dont need to write .java
when you are going to run your program i.e.
$javac abc.java
$java abc