I have the following code inside a .sh script:
#!/bin/ksh
# Set environment variables
ANT_HOME=/home/tools/ANT1.8.2
ANT_OPTS="-Xmx512m"
cd `dirname $0`/..
BASEDIR=`pwd`
PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH
export PATH JAVA_HOME ANT_HOME ANT_OPTS
echo
java -version
echo "JAVA_HOME: $JAVA_HOME"
echo "CLASSPATH: $CLASSPATH"
echo "ANT_HOME: $ANT_HOME"
echo
env
JAVA_HOME has already been set before running the script. I am getting the following output:
java: java: cannot execute [Exec format error]
JAVA_HOME: /path/to/jdk1.6_64bit
CLASSPATH:
ANT_HOME: /home/tools/ANT1.8.2
_=*32592*/bin/env
ANT_HOME=/home/tools/ANT1.8.2
ANT_OPTS=-Xmx512m
...so on
The machine is 64-bit. I do not understand why am I getting the java error. The weird part here is this:
_=*32592*/bin/env
It looks like I am getting the error due to this 32592 but I'm not able to figure out what it is??
Can someone please help me or give me some suggestions?
EDIT: Sorry, I am running this script on Linux machine itself, not AIX machine. The reason I am pointing JAVA_HOME to an aix version is because further operations are done after connecting to an AIX machine through this script.